RoboMWM / GPAuctions

1 stars 3 forks source link

Could not pass [insert event type here] #60

Closed NullCase closed 5 years ago

NullCase commented 5 years ago

Hi @RoboMWM Today I'm testing the latest GPAuctions version.

It looks like "sign clicked" is being registered for all player events. Including things like placing or breaking blocks.


[17:18:08] [Server thread/ERROR]: Could not pass event PlayerInteractEvent to GPAuctions v1.2.2 commit a372ba1
--
java.lang.ClassCastException: org.bukkit.craftbukkit.v1_14_R1.block.CraftBlockState cannot be cast to org.bukkit.block.Sign
at com.robomwm.gpauctions.listener.MakeBidListener.isAuctionSign(MakeBidListener.java:114) ~[?:?]
at com.robomwm.gpauctions.listener.MakeBidListener.onSignClick(MakeBidListener.java:69) ~[?:?]
at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37) ~[patched_1.14.4.jar:git-Paper-160]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.14.4.jar:git-Paper-160]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.14.4.jar:git-Paper-160]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:545) ~[patched_1.14.4.jar:git-Paper-160]
at org.bukkit.craftbukkit.v1_14_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:445) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.PlayerInteractManager.a(PlayerInteractManager.java:441) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1361) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.PacketPlayInUseItem.a(PacketPlayInUseItem.java:27) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.PacketPlayInUseItem.a(PacketPlayInUseItem.java:5) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.TickTask.run(SourceFile:18) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.MinecraftServer.aX(MinecraftServer.java:1012) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.MinecraftServer.executeNext(MinecraftServer.java:1005) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeAll(IAsyncTaskHandler.java:95) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:1134) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:918) ~[patched_1.14.4.jar:git-Paper-160]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_221]

here's the log for breaking a grass block or dirt block.


[17:16:41] [Server thread/INFO]: [GPAuctions] Sign clicked
--
[17:16:41] [Server thread/ERROR]: Could not pass event BlockBreakEvent to GPAuctions v1.2.2 commit a372ba1
java.lang.ClassCastException: org.bukkit.craftbukkit.v1_14_R1.block.CraftBlockState cannot be cast to org.bukkit.block.Sign
at com.robomwm.gpauctions.listener.MakeBidListener.isAuctionSign(MakeBidListener.java:114) ~[?:?]
at com.robomwm.gpauctions.listener.MakeBidListener.onSignBreak(MakeBidListener.java:47) ~[?:?]
at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37) ~[patched_1.14.4.jar:git-Paper-160]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.14.4.jar:git-Paper-160]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.14.4.jar:git-Paper-160]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:545) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.PlayerInteractManager.breakBlock(PlayerInteractManager.java:303) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.PlayerInteractManager.a(PlayerInteractManager.java:262) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.PlayerInteractManager.a(PlayerInteractManager.java:156) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1307) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.PacketPlayInBlockDig.a(SourceFile:40) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.PacketPlayInBlockDig.a(SourceFile:10) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.TickTask.run(SourceFile:18) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.MinecraftServer.aX(MinecraftServer.java:1012) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.MinecraftServer.executeNext(MinecraftServer.java:1005) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeAll(IAsyncTaskHandler.java:95) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:1134) ~[patched_1.14.4.jar:git-Paper-160]
at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:918) ~[patched_1.14.4.jar:git-Paper-160]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_221]
NullCase commented 5 years ago

Bidding is unavailable at the moment but It seems like that might be this issue so I won't post another one. Because why not keep things simple :)

NullCase commented 5 years ago

Tested and its all working well. Fully testing #59 will take time but $ are sent.