diff --git a/src/main/java/me/libraryaddict/disguise/utilities/reflection/asm/LibsDisguisesCompat.java b/src/main/java/me/libraryaddict/disguise/utilities/reflection/asm/LibsDisguisesCompat.java index 7620e3ed..24a0af8f 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/reflection/asm/LibsDisguisesCompat.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/reflection/asm/LibsDisguisesCompat.java @@ -1,9 +1,16 @@ package me.libraryaddict.disguise.utilities.reflection.asm; +import me.libraryaddict.disguise.utilities.reflection.ClassGetter; import org.bukkit.plugin.java.JavaPlugin; +import java.util.ArrayList; + /** * Created by libraryaddict on 20/05/2021. */ public class LibsDisguisesCompat extends JavaPlugin { + @Override + public void onLoad() { + ClassGetter.getClassesForPackage("me.libraryaddict.disguise.disguisetypes"); + } } diff --git a/src/main/java/me/libraryaddict/disguise/utilities/reflection/asm/WatcherSanitizer.java b/src/main/java/me/libraryaddict/disguise/utilities/reflection/asm/WatcherSanitizer.java index 0a98cca9..66eb0ed2 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/reflection/asm/WatcherSanitizer.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/reflection/asm/WatcherSanitizer.java @@ -69,14 +69,16 @@ public class WatcherSanitizer { public static void init() { try { checkPreLoaded(); - } catch (NoSuchFieldException | IllegalAccessException ignored) { + } catch (NoSuchFieldException | IllegalAccessException e) { + LibsDisguises.getInstance().getLogger().info("Failed to check for early class access, this shouldn't be an issue"); } if (Bukkit.getPluginManager().getPlugin("LibsDisguisesVersioning") != null) { throw new IllegalStateException("Why is LibsDisguisesVersioning already active? Did the server owner do something.. Weird?"); } - LibsDisguises.getInstance().getLogger().info("Due to issues with Java 16, you may notice harmless errors saying plugin loaded another plugin that isnt a soft depend or so on"); + LibsDisguises.getInstance().getLogger() + .info("Due to issues with Java 16, you may notice harmless errors saying plugin loaded another plugin that isnt a soft depend or so on"); FakePluginCreator fakePluginCreator = new FakePluginCreator();