Move asm to onLoad just incase other plugins are weird loading
This commit is contained in:
parent
51296f1cae
commit
7fcd90a338
@ -31,6 +31,7 @@ public class LibsDisguises extends JavaPlugin {
|
||||
@Override
|
||||
public void onLoad() {
|
||||
if (Bukkit.getServer().getWorlds().isEmpty()) {
|
||||
WatcherSanitizer.init();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -79,7 +80,6 @@ public class LibsDisguises extends JavaPlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
WatcherSanitizer.init();
|
||||
ReflectionManager.init();
|
||||
|
||||
PacketsManager.init();
|
||||
|
@ -55,7 +55,6 @@ public class ReflectionManager {
|
||||
private static Field trackerField;
|
||||
@NmsRemovedIn(val = NmsVersion.v1_14)
|
||||
private static Field entitiesField;
|
||||
@Getter
|
||||
private static NmsVersion version;
|
||||
|
||||
public static void init() {
|
||||
@ -360,6 +359,14 @@ public class ReflectionManager {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static NmsVersion getVersion() {
|
||||
if (version == null) {
|
||||
getBukkitVersion();
|
||||
}
|
||||
|
||||
return version;
|
||||
}
|
||||
|
||||
public static String getBukkitVersion() {
|
||||
if (bukkitVersion == null) {
|
||||
bukkitVersion = Bukkit.getServer().getClass().getName().split("\\.")[3];
|
||||
|
Loading…
Reference in New Issue
Block a user