Showing specific enchantments throws a IllegalArgumentException (Specified enchantment cannot be applied to this itemstack)
Taronyuu opened this issue ยท 5 comments
Deleting the following enchantments fixes this problem:
- SILK_TOUCH (1 and 2)
- FROST_WALKER (1 and 2)
- MENDING
Stacktrace:
Could not pass event InventoryClickEvent to HyperMerchant v1.59 org.bukkit.event.EventException at me.incomprehendable.dev.pwp.transparentlisteners.PerWorldPluginLoader$1.execute(PerWorldPluginLoader.java:118) ~[?:?] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.10.jar:git-Spigot-3ccadba-fb568fd] at me.incomprehendable.dev.pwp.transparentlisteners.PWPRegisteredListener.callEvent(PWPRegisteredListener.java:28) [PerWorldPlugins.jar:?] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.10.jar:git-Spigot-3ccadba-fb568fd] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.10.jar:git-Spigot-3ccadba-fb568fd] at net.minecraft.server.v1_10_R1.PlayerConnection.a(PlayerConnection.java:1850) [spigot-1.10.jar:git-Spigot-3ccadba-fb568fd] at net.minecraft.server.v1_10_R1.PacketPlayInWindowClick.a(SourceFile:33) [spigot-1.10.jar:git-Spigot-3ccadba-fb568fd] at net.minecraft.server.v1_10_R1.PacketPlayInWindowClick.a(SourceFile:10) [spigot-1.10.jar:git-Spigot-3ccadba-fb568fd] at net.minecraft.server.v1_10_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.10.jar:git-Spigot-3ccadba-fb568fd] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_77] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_77] at net.minecraft.server.v1_10_R1.SystemUtils.a(SourceFile:45) [spigot-1.10.jar:git-Spigot-3ccadba-fb568fd] at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:733) [spigot-1.10.jar:git-Spigot-3ccadba-fb568fd] at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:399) [spigot-1.10.jar:git-Spigot-3ccadba-fb568fd] at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:672) [spigot-1.10.jar:git-Spigot-3ccadba-fb568fd] at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:571) [spigot-1.10.jar:git-Spigot-3ccadba-fb568fd] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_77] Caused by: java.lang.IllegalArgumentException: Specified enchantment cannot be applied to this itemstack at org.bukkit.inventory.ItemStack.addEnchantment(ItemStack.java:440) ~[spigot-1.10.jar:git-Spigot-3ccadba-fb568fd] at grokswell.util.EnchantIcons.getIcon(EnchantIcons.java:43) ~[?:?] at grokswell.hypermerchant.ShopMenu.loadPage(ShopMenu.java:205) ~[?:?] at grokswell.hypermerchant.ShopMenu.previousPage(ShopMenu.java:267) ~[?:?] at grokswell.hypermerchant.ShopMenu.handleMenuCommand(ShopMenu.java:446) ~[?:?] at grokswell.hypermerchant.ShopMenu.onInventoryClickOrCreative(ShopMenu.java:554) ~[?:?] at grokswell.hypermerchant.ShopMenu.onInventoryClick(ShopMenu.java:535) ~[?:?]
Its not important for us, and we where able to see what went wrong by looking at the exceptions but this might be usefull for other people. ๐
I have a similar issue, I just upgraded to the latest dev build and I am running Spigot.
Before the dev build, having an enchant with mending would cause /managemenu to refuse to open with an internal error.
Upgrading to the latest dev build fixed this, however now when attempting to change the status of an most any enchantment from none to anything else via /managemenu I get the following error in the console: (Specifically tried with Eff 3 and Silk Touch)
http://pastebin.com/bsYQHgnq
Please try dev build #32
http://ci.citizensnpcs.co/job/HyperMerchant/32/
Thanks for reporting this!
Just tried on build 32, with HyperConomy 0.985.7 (Should be the latest dev build)
You can add enchants to the shop easily now, however clicking on the comparator to set the status (Trade/Buy/Sell) then clicking on an enchanted item results in the following error being thrown in the console.
http://pastebin.com/6NLQxu7q
if you do /manageshop status unbreaking_3 trade the item will be enabled in the shop as expected.
Okay This should be fixed in build #33
http://ci.citizensnpcs.co/job/HyperMerchant/33/