diff --git a/build.gradle.kts b/build.gradle.kts index 442cc53e..bf890367 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ import java.text.SimpleDateFormat -version = "1.10.12-beta1" +version = "1.10.12-beta2" plugins { `java-library` @@ -40,7 +40,7 @@ dependencies { compileOnly("org.black_ixx:playerpoints:3.2.5") compileOnly("net.luckperms:api:5.4") compileOnly("me.clip:placeholderapi:2.11.1") - compileOnly("com.github.LoneDev6:API-ItemsAdder:3.5.0b") + compileOnly("com.github.LoneDev6:API-ItemsAdder:3.6.3-beta-14") compileOnly("com.github.oraxen:oraxen:1.160.0") compileOnly("io.lumine:Mythic-Dist:5.3.5") compileOnly("io.lumine:MythicLib-dist:1.6.2-SNAPSHOT") diff --git a/src/main/java/com/github/yufiriamazenta/craftorithm/Craftorithm.java b/src/main/java/com/github/yufiriamazenta/craftorithm/Craftorithm.java index ba770848..4e555277 100644 --- a/src/main/java/com/github/yufiriamazenta/craftorithm/Craftorithm.java +++ b/src/main/java/com/github/yufiriamazenta/craftorithm/Craftorithm.java @@ -29,6 +29,11 @@ public Craftorithm() { INSTANCE = this; } + @Override + public void load() { + super.load(); + } + @Override public void enable() { if (CrypticLib.minecraftVersion() < 11904) { @@ -38,10 +43,10 @@ public void enable() { CrypticLib.setDebug(PluginConfigs.DEBUG.value()); PluginHookUtil.hookPlugins(); + Bukkit.getPluginManager().registerEvents(this, this); if (PluginHookUtil.isItemsAdderLoaded()) { + MsgSender.debug("[Craftorithm] Registering ItemsAdder Handler"); Bukkit.getPluginManager().registerEvents(ItemsAdderHandler.INSTANCE, this); - } else { - Bukkit.getPluginManager().registerEvents(this, this); } ItemManager.INSTANCE.loadItemManager(); diff --git a/src/main/java/com/github/yufiriamazenta/craftorithm/listener/ItemsAdderHandler.java b/src/main/java/com/github/yufiriamazenta/craftorithm/listener/ItemsAdderHandler.java index 94b1123f..daa80948 100644 --- a/src/main/java/com/github/yufiriamazenta/craftorithm/listener/ItemsAdderHandler.java +++ b/src/main/java/com/github/yufiriamazenta/craftorithm/listener/ItemsAdderHandler.java @@ -11,15 +11,12 @@ public enum ItemsAdderHandler implements Listener { INSTANCE; - private boolean isEnable = true; - @EventHandler(priority = EventPriority.MONITOR) public void onItemsAdderLoaded(ItemsAdderLoadDataEvent event) { - if (!PluginConfigs.RELOAD_WHEN_IA_RELOAD.value() && !isEnable) + if (!PluginConfigs.RELOAD_WHEN_IA_RELOAD.value()) return; RecipeManager.INSTANCE.reloadRecipeManager(); OtherPluginsListenerProxy.INSTANCE.reloadOtherPluginsListener(); - isEnable = false; } } \ No newline at end of file