Could not pass event InventoryClickEvent to GUIShop v7.3.8
oreo1337 opened this issue · 7 comments
[14:13:56] [Server thread/ERROR]: Could not pass event InventoryClickEvent to GUIShop v7.3.8
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:1630) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.PacketPlayInWindowClick.a(SourceFile:31) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.PacketPlayInWindowClick.a(SourceFile:9) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_251]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_251]
at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_251]
Caused by: java.lang.NullPointerException
at com.pablo67340.guishop.listenable.Shop.open(Shop.java:400) ~[?:?]
at com.pablo67340.guishop.listenable.Menu.openShop(Menu.java:187) ~[?:?]
at com.pablo67340.guishop.listenable.Menu.onShopClick(Menu.java:166) ~[?:?]
at com.github.stefvanschie.inventoryframework.GuiListener.onInventoryClick(GuiListener.java:59) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_251]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_251]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_251]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_251]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
... 15 more
This user's stacktrace is from GUIShop 7.3.8.
I believe that newer versions of GUIShop will simply omit the item in the shops.yml, which I hope is enough of an indicator that the item could not be parsed.
Perhaps we can catch this exception and print a proper message to make it more clear for those who cannot understand a stacktrace.
@pablo67340 I am using the default shop.yml and I am getting the same error.
02.05 13:30:29 [Server] ERROR Could not pass event InventoryClickEvent to GUIShop v7.3.8
02.05 13:30:29 [Server] INFO org.bukkit.event.EventException: null
02.05 13:30:29 [Server] INFO at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:72) ~[patched_1.12.2.jar:git-Paper-1594]
02.05 13:30:29 [Server] INFO at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.12.2.jar:git-Paper-1594]
02.05 13:30:29 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.12.2.jar:git-Paper-1594]
02.05 13:30:29 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:513) ~[patched_1.12.2.jar:git-Paper-1594]
02.05 13:30:29 [Server] INFO at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1988) ~[patched_1.12.2.jar:git-Paper-1594]
02.05 13:30:29 [Server] INFO at net.minecraft.server.v1_12_R1.PacketPlayInWindowClick.a(SourceFile:33) ~[patched_1.12.2.jar:git-Paper-1594]
02.05 13:30:29 [Server] INFO at net.minecraft.server.v1_12_R1.PacketPlayInWindowClick.a(SourceFile:10) ~[patched_1.12.2.jar:git-Paper-1594]
02.05 13:30:29 [Server] INFO at net.minecraft.server.v1_12_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:14) ~[patched_1.12.2.jar:git-Paper-1594]
02.05 13:30:29 [Server] INFO at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_242]
02.05 13:30:29 [Server] INFO at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_242]
02.05 13:30:29 [Server] INFO at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) ~[patched_1.12.2.jar:git-Paper-1594]
02.05 13:30:29 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:850) ~[patched_1.12.2.jar:git-Paper-1594]
02.05 13:30:29 [Server] INFO at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:423) ~[patched_1.12.2.jar:git-Paper-1594]
02.05 13:30:29 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:774) ~[patched_1.12.2.jar:git-Paper-1594]
02.05 13:30:29 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:666) ~[patched_1.12.2.jar:git-Paper-1594]
02.05 13:30:29 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
02.05 13:30:29 [Server] INFO Caused by: java.lang.NullPointerException
02.05 13:30:29 [Server] INFO at com.pablo67340.guishop.listenable.Shop.loadShop(Shop.java:296) ~[?:?]
02.05 13:30:29 [Server] INFO at com.pablo67340.guishop.listenable.Shop.loadItems(Shop.java:194) ~[?:?]
02.05 13:30:29 [Server] INFO at com.pablo67340.guishop.listenable.Menu.openShop(Menu.java:186) ~[?:?]
02.05 13:30:29 [Server] INFO at com.pablo67340.guishop.listenable.Menu.onShopClick(Menu.java:166) ~[?:?]
02.05 13:30:29 [Server] INFO at com.github.stefvanschie.inventoryframework.GuiListener.onInventoryClick(GuiListener.java:59) ~[?:?]
02.05 13:30:29 [Server] INFO at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor145.execute(Unknown Source) ~[?:?]
02.05 13:30:29 [Server] INFO at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70) ~[patched_1.12.2.jar:git-Paper-1594]
02.05 13:30:29 [Server] INFO ... 15 more
02.05
If you are on MC <1.12.2 and GUIShop 7.3.8, you need to remove BREWING_STAND, REDSTONE_LAMP, LAPIS_LAZULI, and COCOA_BEANS.