remremrem / HyperMerchant

Inventory GUI for HyperConomy and NPC trait for Citizens2
GNU General Public License v3.0
3 stars 11 forks source link

Showing specific enchantments throws a IllegalArgumentException (Specified enchantment cannot be applied to this itemstack) #7

Closed Taronyuu closed 7 years ago

Taronyuu commented 8 years ago

Deleting the following enchantments fixes this problem:

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. 😄

remremrem commented 8 years ago

Thank you for reporting this! This does not seem to be a problem anymore in the latest development builds of hyperconomy + hypermerchant These builds run on bukkit 1.10.2, however

dniym commented 8 years ago

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

remremrem commented 8 years ago

Please try dev build #32 http://ci.citizensnpcs.co/job/HyperMerchant/32/ Thanks for reporting this!

dniym commented 8 years ago

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.

remremrem commented 8 years ago

Okay This should be fixed in build #33 http://ci.citizensnpcs.co/job/HyperMerchant/33/