diff --git a/pom.xml b/pom.xml
index e6fe28a..acd3ea3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -108,7 +108,7 @@
org.bukkit
bukkit
- 1.15-R0.1-SNAPSHOT
+ 1.15.2-R0.1-SNAPSHOT
provided
@@ -205,12 +205,18 @@
4bb9abd247
provided
-
-
+
+
+ net.mmogroup
+ mmolib
+ 1.0.9
+ provided
org.bstats
diff --git a/src/com/dre/brewery/integration/IntegrationListener.java b/src/com/dre/brewery/integration/IntegrationListener.java
index c4c8a19..712f8b1 100644
--- a/src/com/dre/brewery/integration/IntegrationListener.java
+++ b/src/com/dre/brewery/integration/IntegrationListener.java
@@ -13,8 +13,8 @@ import com.dre.brewery.integration.item.MMOItemsPluginItem;
import com.dre.brewery.recipe.BCauldronRecipe;
import com.dre.brewery.recipe.RecipeItem;
import com.dre.brewery.utility.LegacyUtil;
-import net.Indyuce.mmoitems.MMOItems;
-import net.Indyuce.mmoitems.api.item.NBTItem;
+import net.mmogroup.mmolib.MMOLib;
+import net.mmogroup.mmolib.api.item.NBTItem;
import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.block.Block;
@@ -219,7 +219,7 @@ public class IntegrationListener implements Listener {
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onInteract(PlayerInteractEvent event) {
- // Cancel the Interact Event early, so MMOItems does not act before us and consume the item when trying to add item to Cauldron
+ // Catch the Interact Event early, so MMOItems does not act before us and cancel the event while we try to add it to the Cauldron
if (!P.use1_9) return;
if (BConfig.hasMMOItems == null) {
BConfig.hasMMOItems = P.p.getServer().getPluginManager().isPluginEnabled("MMOItems");
@@ -228,7 +228,7 @@ public class IntegrationListener implements Listener {
try {
if (event.getAction() == Action.RIGHT_CLICK_BLOCK && event.hasItem() && event.getHand() == EquipmentSlot.HAND) {
if (event.getClickedBlock() != null && event.getClickedBlock().getType() == Material.CAULDRON) {
- NBTItem item = MMOItems.plugin.getNMS().getNBTItem(event.getItem());
+ NBTItem item = MMOLib.plugin.getNMS().getNBTItem(event.getItem());
if (item.hasType()) {
for (RecipeItem rItem : BCauldronRecipe.acceptedCustom) {
if (rItem instanceof MMOItemsPluginItem) {
@@ -246,6 +246,7 @@ public class IntegrationListener implements Listener {
} catch (Throwable e) {
P.p.errorLog("Could not check MMOItems for Item");
e.printStackTrace();
+ BConfig.hasMMOItems = false;
}
}
}
diff --git a/src/com/dre/brewery/integration/item/MMOItemsPluginItem.java b/src/com/dre/brewery/integration/item/MMOItemsPluginItem.java
index d4df22e..e3002f9 100644
--- a/src/com/dre/brewery/integration/item/MMOItemsPluginItem.java
+++ b/src/com/dre/brewery/integration/item/MMOItemsPluginItem.java
@@ -3,8 +3,8 @@ package com.dre.brewery.integration.item;
import com.dre.brewery.P;
import com.dre.brewery.filedata.BConfig;
import com.dre.brewery.recipe.PluginItem;
-import net.Indyuce.mmoitems.MMOItems;
-import net.Indyuce.mmoitems.api.item.NBTItem;
+import net.mmogroup.mmolib.MMOLib;
+import net.mmogroup.mmolib.api.item.NBTItem;
import org.bukkit.inventory.ItemStack;
public class MMOItemsPluginItem extends PluginItem {
@@ -21,11 +21,12 @@ public class MMOItemsPluginItem extends PluginItem {
if (!BConfig.hasMMOItems) return false;
try {
- NBTItem nbtItem = MMOItems.plugin.getNMS().getNBTItem(item);
+ NBTItem nbtItem = MMOLib.plugin.getNMS().getNBTItem(item);
return nbtItem.hasType() && nbtItem.getString("MMOITEMS_ITEM_ID").equalsIgnoreCase(getItemId());
} catch (Throwable e) {
e.printStackTrace();
P.p.errorLog("Could not check MMOItems for Item ID");
+ BConfig.hasMMOItems = false;
return false;
}
}
diff --git a/src/com/dre/brewery/integration/item/SlimefunPluginItem.java b/src/com/dre/brewery/integration/item/SlimefunPluginItem.java
index fe33094..e3f72dd 100644
--- a/src/com/dre/brewery/integration/item/SlimefunPluginItem.java
+++ b/src/com/dre/brewery/integration/item/SlimefunPluginItem.java
@@ -28,6 +28,7 @@ public class SlimefunPluginItem extends PluginItem {
} catch (Throwable e) {
e.printStackTrace();
P.p.errorLog("Could not check Slimefun for Item ID");
+ BConfig.hasSlimefun = false;
return false;
}
return false;