remremrem / HyperMerchant

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

Could not pass event InventoryClickEvent to HyperMerchant v1.6.1-dev #12

Closed mb243 closed 7 years ago

mb243 commented 7 years ago

Getting the following in logs in 1.11.2 while using 1.6.1-dev:

[ERROR] Could not pass event InventoryClickEvent to HyperMerchant v1.6.1-dev

Not entirely sure the cause as I don't have enough info from the players to actually replicate, though they are seeing it a lot.

remremrem commented 7 years ago

I am afraid this isn't enough info for me to solve the issue. Is there any thing else in the logs, or console? Maybe your players can tell you which shops this happens in, or what items might be causing the issue. What build of spigot are you using?

mb243 commented 7 years ago

I'll look into this more this weekend and see what additional info I can get you.

mb243 commented 7 years ago

Is there any thing else in the logs, or console?

I found more info recorded in the server log. Sorry for not getting it to you in the beginning:

[20:59:05] [Server thread/ERROR]: Could not pass event InventoryClickEvent to HyperMerchant v1.6.1-dev
org.bukkit.event.EventException
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot.jar:git-Spigot-54ec0b8-e04a179]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot.jar:git-Spigot-54ec0b8-e04a179]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot.jar:git-Spigot-54ec0b8-e04a179]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot.jar:git-Spigot-54ec0b8-e04a179]
        at net.minecraft.server.v1_11_R1.PlayerConnection.a(PlayerConnection.java:1848) [spigot.jar:git-Spigot-54ec0b8-e04a179]
        at net.minecraft.server.v1_11_R1.PacketPlayInWindowClick.a(SourceFile:33) [spigot.jar:git-Spigot-54ec0b8-e04a179]
        at net.minecraft.server.v1_11_R1.PacketPlayInWindowClick.a(SourceFile:10) [spigot.jar:git-Spigot-54ec0b8-e04a179]
        at net.minecraft.server.v1_11_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-54ec0b8-e04a179]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_121]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_121]
        at net.minecraft.server.v1_11_R1.SystemUtils.a(SourceFile:46) [spigot.jar:git-Spigot-54ec0b8-e04a179]
        at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:747) [spigot.jar:git-Spigot-54ec0b8-e04a179]
        at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:399) [spigot.jar:git-Spigot-54ec0b8-e04a179]
        at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:678) [spigot.jar:git-Spigot-54ec0b8-e04a179]
        at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:576) [spigot.jar:git-Spigot-54ec0b8-e04a179]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.v1_11_R1.entity.CraftPlayer cannot be cast to org.bukkit.inventory.PlayerInventory
        at grokswell.hypermerchant.ShopTransactions.SellSingleEnchant(ShopTransactions.java:138) ~[?:?]
        at grokswell.hypermerchant.ShopTransactions.SellItem(ShopTransactions.java:104) ~[?:?]
        at grokswell.hypermerchant.ShopTransactions.Sell(ShopTransactions.java:79) ~[?:?]
        at grokswell.hypermerchant.ShopMenu.handleMenuItem(ShopMenu.java:533) ~[?:?]
        at grokswell.hypermerchant.ShopMenu.onInventoryClickOrCreative(ShopMenu.java:564) ~[?:?]
        at grokswell.hypermerchant.ShopMenu.onInventoryClick(ShopMenu.java:545) ~[?:?]
        at sun.reflect.GeneratedMethodAccessor524.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot.jar:git-Spigot-54ec0b8-e04a179]
        ... 15 more

Maybe your players can tell you which shops this happens in, or what items might be causing the issue.

We have only 1 shop, GlobalShop. I've been able to verify that this happens when left-clicking an enchanted object on the matching enchantment in the shop GUI to sell it.

What build of spigot are you using?

Always the latest. As of today:

[15:27:18 INFO]: This server is running CraftBukkit version git-Spigot-9ba269b-c19c293 (MC: 1.11.2) (Implementing API version 1.11.2-R0.1-SNAPSHOT)
[15:27:18 INFO]: Checking version, please wait...
[15:27:18 INFO]: You are running the latest version
remremrem commented 7 years ago

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

Thanks for reporting this!

mb243 commented 7 years ago

All good now. Thanks!