-
-
Notifications
You must be signed in to change notification settings - Fork 20
GH-884 Fix sound serdes #884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
bc38f71
Support new sound serdes after bukkit api update. Drop java 17 suppor…
Rollczi 0b1636d
Fix some issues
CitralFlo 5a06e7b
Create universal old enum composer
Rollczi f149ae4
Fix local publisher
Rollczi 29f2d05
@Compatibility WiP
Rollczi dba332c
Use CompatibilityService
Rollczi b9a3384
Fix
Rollczi c60bcd5
Improve dependency injector management
Rollczi eebe410
Update multification.
vLuckyyy c8e823d
Merge branch 'master' into fix-sound-serdes
vLuckyyy 392e9ea
Prevent redundant delay marking when looping through items
Jakubk15 5fd6d66
Do not wrap Supplier in another Supplier
Jakubk15 0848bdd
Fixes
Rollczi ec042a0
Fix potion effect
Rollczi 722e5b0
Fix SHORT_GRASS
Rollczi 23e9971
Add Material.LEGACY_GRASS,
Rollczi 5b46ead
Rename HOW_USE_DI.md to HOW_USE_TO_DI.md
Jakubk15 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
eternalcore-api/src/main/java/com/eternalcode/core/delay/DelaySettings.java
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
eternalcore-core/src/main/java/com/eternalcode/core/bridge/BridgeManagerInitializer.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
eternalcore-core/src/main/java/com/eternalcode/core/bridge/metrics/BStatsMetricsSetup.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
eternalcore-core/src/main/java/com/eternalcode/core/bridge/skullapi/SkullAPISetup.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
eternalcore-core/src/main/java/com/eternalcode/core/compatibility/Compatibility.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| package com.eternalcode.core.compatibility; | ||
|
|
||
| import java.lang.annotation.ElementType; | ||
| import java.lang.annotation.Retention; | ||
| import java.lang.annotation.RetentionPolicy; | ||
| import java.lang.annotation.Target; | ||
|
|
||
| @Retention(RetentionPolicy.RUNTIME) | ||
| @Target(ElementType.TYPE) | ||
| public @interface Compatibility { | ||
|
|
||
| Version from() default @Version(minor = Integer.MIN_VALUE, patch = Integer.MIN_VALUE); | ||
|
|
||
| Version to() default @Version(minor = Integer.MAX_VALUE, patch = Integer.MAX_VALUE); | ||
|
|
||
| } |
31 changes: 31 additions & 0 deletions
31
eternalcore-core/src/main/java/com/eternalcode/core/compatibility/CompatibilityService.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package com.eternalcode.core.compatibility; | ||
|
|
||
| import io.papermc.lib.PaperLib; | ||
|
|
||
| public class CompatibilityService { | ||
|
|
||
| public boolean isCompatible(Class<?> type) { | ||
| Compatibility compatibility = type.getAnnotation(Compatibility.class); | ||
| if (compatibility == null) { | ||
| return true; | ||
| } | ||
|
|
||
| Version from = compatibility.from(); | ||
| Version to = compatibility.to(); | ||
|
|
||
| int minor = PaperLib.getMinecraftVersion(); | ||
| int patch = PaperLib.getMinecraftPatchVersion(); | ||
|
|
||
| return isCompatibleFrom(from, minor, patch) && isCompatibleTo(to, minor, patch); | ||
| } | ||
vLuckyyy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| private boolean isCompatibleTo(Version to, int minor, int patch) { | ||
| return minor < to.minor() || minor == to.minor() && patch <= to.patch(); | ||
| } | ||
|
|
||
| private boolean isCompatibleFrom(Version from, int minor, int patch) { | ||
| return minor > from.minor() || minor == from.minor() && patch >= from.patch(); | ||
| } | ||
|
|
||
| } | ||
|
|
||
15 changes: 15 additions & 0 deletions
15
eternalcore-core/src/main/java/com/eternalcode/core/compatibility/Version.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| package com.eternalcode.core.compatibility; | ||
|
|
||
| import java.lang.annotation.ElementType; | ||
| import java.lang.annotation.Retention; | ||
| import java.lang.annotation.RetentionPolicy; | ||
| import java.lang.annotation.Target; | ||
|
|
||
| @Retention(RetentionPolicy.RUNTIME) | ||
| @Target(ElementType.FIELD) | ||
| public @interface Version { | ||
|
|
||
| int minor(); | ||
| int patch(); | ||
|
|
||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.