Prepare plugin to Paper's not relocating CB classes anymore

This commit is contained in:
OmerBenGera 2024-04-23 21:47:52 +03:00
parent a07499aa66
commit e45b9e77c4
2 changed files with 5 additions and 5 deletions

View File

@ -26,7 +26,7 @@ allprojects {
}
dependencies {
compileOnly "com.bgsoftware.common.reflection:ReflectionUtils:latest"
compileOnly "com.bgsoftware.common.reflection:ReflectionUtils:b2"
}
task checkDebug() {
@ -55,7 +55,7 @@ dependencies {
implementation fileTree(rootProject.archiveFolder.getAbsolutePath())
implementation project(":API")
implementation 'com.bgsoftware.common.reflection:ReflectionUtils:latest'
implementation 'com.bgsoftware.common.reflection:ReflectionUtils:b2'
implementation 'com.bgsoftware.common.config:CommentedConfiguration:1.0.3'
implementation 'com.bgsoftware.common.dependencies:DependenciesManager:b2'

View File

@ -24,9 +24,9 @@ public enum ServerVersion {
private static final boolean legacy;
static {
bukkitVersion = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
String[] sections = bukkitVersion.split("_");
currentVersion = ServerVersion.valueOf(sections[0] + "_" + sections[1]);
bukkitVersion = Bukkit.getBukkitVersion().split("-")[0];
String[] sections = bukkitVersion.split("\\.");
currentVersion = ServerVersion.valueOf("v" + sections[0] + "_" + sections[1]);
legacy = isLessThan(ServerVersion.v1_13);
}