Ajneb97 / ConditionalEvents

MIT License
22 stars 12 forks source link

Console error #18

Closed Rexmen1 closed 11 months ago

Rexmen1 commented 1 year ago

[15:30:48] [Server thread/INFO]: [ConditionalEvents] Loading server plugin ConditionalEvents v4.34.2 [15:31:17] [Server thread/INFO]: [ConditionalEvents] Enabling ConditionalEvents v4.34.2 [15:31:17] [Server thread/INFO]: [PlaceholderAPI] Successfully registered expansion: conditionalevents [4.34.2] [15:31:17] [Server thread/INFO]: [ConditionalEvents] Has been enabled! Version: 4.34.2 [15:31:17] [Server thread/INFO]: [ConditionalEvents] Thanks for using my plugin! ~Ajneb97 [17:37:04] [Server thread/ERROR]: Could not pass event InventoryClickEvent to ConditionalEvents v4.34.2 java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_20_R1.inventory.CraftInventoryCustom cannot be cast to class org.bukkit.inventory.AnvilInventory (org.bukkit.craftbukkit.v1_20_R1.inventory.CraftInventoryCustom and org.bukkit.inventory.AnvilInventory are in unnamed module of loader java.net.URLClassLoader @619a5dff) at ce.ajneb97.listeners.ItemEventsListener.onItemRepair(ItemEventsListener.java:98) ~[ConditionalEvents.jar:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1682.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[purpur-api-1.20.1-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[purpur-api-1.20.1-R0.1-SNAPSHOT.jar:git-Purpur-2016] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.20.1-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.20.1.jar:git-Purpur-2016] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[purpur-1.20.1.jar:git-Purpur-2016] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:617) ~[purpur-api-1.20.1-R0.1-SNAPSHOT.jar:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3295) ~[?:?] at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:58) ~[?:?] at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:23) ~[?:?] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.20.1.jar:git-Purpur-2016] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1366) ~[purpur-1.20.1.jar:git-Purpur-2016] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[purpur-1.20.1.jar:git-Purpur-2016] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1343) ~[purpur-1.20.1.jar:git-Purpur-2016] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1336) ~[purpur-1.20.1.jar:git-Purpur-2016] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1314) ~[purpur-1.20.1.jar:git-Purpur-2016] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1202) ~[purpur-1.20.1.jar:git-Purpur-2016] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[purpur-1.20.1.jar:git-Purpur-2016] at java.lang.Thread.run(Thread.java:833) ~[?:?]

Rexmen1 commented 1 year ago

1.20 purpur

Ajneb97 commented 1 year ago

When does the error occur?

yiyoperez commented 1 year ago

When does the error occur?

Seems like it happen when the plugin has been enabled, for some reason InventoryClickEvent gets called and cast exception ocurrs at this line. No idea why, but still happening, this if statement should check prevent it from happening.

Ajneb97 commented 1 year ago

I'm pretty noob on new Minecraft versions, maybe there is a new block similar to an anvil or do something similar?

Rexmen1 commented 1 year ago

I have no idea actually when and what triggers too... It just shows in console and there are 30-40 players online

Rexmen1 commented 1 year ago

So anything about this? because still getting same error to this day....

Ajneb97 commented 1 year ago

I haven't been able to replicate it on my server, if you still don't know when does it happens, then I don't know where to look. If it doesn't affect you, then you can try to add a plugin that filters messages on the console.