DemonBoiAnzu / ItemQualities

A plugin that adds Qualities to Items, along with the ability for the user to create their own.
MIT License
10 stars 3 forks source link

Could not pass event Player Interact Event to Item Qualities v1.0.6 #11

Closed fahlur closed 2 years ago

fahlur commented 2 years ago

noticed this error showed (spammed a bit). looking into what triggered it directly but wasn't on the server at the time the errors occurred. Still reporting the stack trace

[17:42:50 ERROR]: Could not pass event PlayerInteractEvent to ItemQualities v1.0.6 java.lang.IllegalArgumentException: bound must be positive at java.util.Random.nextInt(Random.java:322) ~[?:?] at com.abraxas.itemqualities.listeners.BlockListeners.reforgeItem(BlockListeners.java:239) ~[ItemQualities-1.0.6.jar:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor33.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:75) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:git-Purpur-1670] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:666) ~[purpur-api-1.19-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_19_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:544) ~[purpur-1.19.jar:git-Purpur-1670] at net.minecraft.server.level.ServerPlayerGameMode.useItemOn(ServerPlayerGameMode.java:529) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItemOn(ServerGamePacketListenerImpl.java:1945) ~[?:?] at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.handle(ServerboundUseItemOnPacket.java:37) ~[?:?] at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.a(ServerboundUseItemOnPacket.java:9) ~[?:?] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.19.jar:git-Purpur-1670] 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:1385) ~[purpur-1.19.jar:git-Purpur-1670] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:183) ~[purpur-1.19.jar:git-Purpur-1670] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1362) ~[purpur-1.19.jar:git-Purpur-1670] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1355) ~[purpur-1.19.jar:git-Purpur-1670] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1333) ~[purpur-1.19.jar:git-Purpur-1670] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1218) ~[purpur-1.19.jar:git-Purpur-1670] at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:307) ~[purpur-1.19.jar:git-Purpur-1670] at java.lang.Thread.run(Thread.java:833) ~[?:?]

DemonBoiAnzu commented 2 years ago

Yeah, this was caused by the Quality pool for Reforging being dependent on how damaged the anvil is. This is fixed in 1.0.7! Which is coming soon, hopefully, I'm working on a huge new thing and fixing a ton of issues. I will close this when the update is released, thanks for the report!

DemonBoiAnzu commented 2 years ago

Deciding to close this now as I've fixed it in 1.0.7. Release soon!

DemonBoiAnzu commented 2 years ago

Fixed in release 1.1.0!