Skip to content

Commit

Permalink
[1.10.12-beta2]再次修复ItemsAdder4存在时无法正确加载配方的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
YufiriaMazenta committed Oct 28, 2024
1 parent ed40763 commit 73769fb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import java.text.SimpleDateFormat
version = "1.10.12-beta1"
version = "1.10.12-beta2"

plugins {
`java-library`
Expand Down Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ public Craftorithm() {
INSTANCE = this;
}

@Override
public void load() {
super.load();
}

@Override
public void enable() {
if (CrypticLib.minecraftVersion() < 11904) {
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

}

0 comments on commit 73769fb

Please sign in to comment.