diff --git a/.idea/libraries/CustomItemsAPI_PLACEHOLDER.xml b/.idea/libraries/CustomItemsAPI_PLACEHOLDER.xml new file mode 100644 index 0000000..1cb21a4 --- /dev/null +++ b/.idea/libraries/CustomItemsAPI_PLACEHOLDER.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/Command Panels.iml b/Command Panels.iml index c1aaf65..49b3832 100644 --- a/Command Panels.iml +++ b/Command Panels.iml @@ -17,5 +17,6 @@ + \ No newline at end of file diff --git a/resource/plugin.yml b/resource/plugin.yml index 9c0ebb9..c1dbe1a 100644 --- a/resource/plugin.yml +++ b/resource/plugin.yml @@ -1,10 +1,10 @@ -version: 3.14.4.4 +version: 3.14.4.5 main: me.rockyhawk.commandpanels.CommandPanels name: CommandPanels author: RockyHawk api-version: '1.13' description: Fully Custom GUIs. Make your Server Professional. -softdepend: [PlaceholderAPI, Vault, HeadDatabase, TokenManager, VotingPlugin, MMOItems] +softdepend: [PlaceholderAPI, Vault, HeadDatabase, TokenManager, VotingPlugin, MMOItems, CustomItems] commands: commandpanel: description: Open a command panel. diff --git a/src/me/rockyhawk/commandpanels/classresources/CommandTags.java b/src/me/rockyhawk/commandpanels/classresources/CommandTags.java index 3a7c827..86e33f1 100644 --- a/src/me/rockyhawk/commandpanels/classresources/CommandTags.java +++ b/src/me/rockyhawk/commandpanels/classresources/CommandTags.java @@ -179,7 +179,13 @@ public class CommandTags { new BukkitRunnable() { @Override public void run() { - commandTags(p, finalCommand, commandRAW); + try { + commandTags(p, finalCommand, commandRAW); + }catch (Exception ex){ + //if there are any errors, cancel so that it doesn't loop errors + plugin.debug(ex); + this.cancel(); + } this.cancel(); } }.runTaskTimer(plugin, 20*delaySeconds, 20); //20 ticks == 1 second diff --git a/src/me/rockyhawk/commandpanels/classresources/ItemCreation.java b/src/me/rockyhawk/commandpanels/classresources/ItemCreation.java index a78362f..4638b38 100644 --- a/src/me/rockyhawk/commandpanels/classresources/ItemCreation.java +++ b/src/me/rockyhawk/commandpanels/classresources/ItemCreation.java @@ -1,5 +1,6 @@ package me.rockyhawk.commandpanels.classresources; +import com.jojodmo.customitems.api.CustomItemsAPI; import me.arcaniax.hdb.api.HeadDatabaseAPI; import me.rockyhawk.commandpanels.CommandPanels; import me.rockyhawk.commandpanels.ioclasses.NBTEditor; @@ -95,7 +96,7 @@ public class ItemCreation { } } - //create custom MMOItems item + //creates custom MMOItems items if(matraw.split("\\s")[0].toLowerCase().equals("mmo=") && plugin.getServer().getPluginManager().isPluginEnabled("MMOItems")){ String itemType = matraw.split("\\s")[1]; String itemID = matraw.split("\\s")[2]; @@ -105,6 +106,12 @@ public class ItemCreation { normalCreation = false; } + //creates Custom Items items + if(matraw.split("\\s")[0].toLowerCase().equals("cui=") && plugin.getServer().getPluginManager().isPluginEnabled("CustomItems")){ + s = CustomItemsAPI.getCustomItem("cui:" + matraw.split("\\s")[1]); + normalCreation = false; + } + if(normalCreation) { s = new ItemStack(Objects.requireNonNull(Material.matchMaterial(mat)), 1, id); }