Right clicking with a drug in hand gives a "/ by zero" error
Hibanan opened this issue ยท 2 comments
After updating from the 0.1 beta-8 to 0.1, right clicking with a single newly crafted drug in hand gives the following error in the server's logs:
[05:41:04 ERROR]: Could not pass event PlayerInteractEvent to MyTrip v0.1 java.lang.ArithmeticException: / by zero at de.chaffic.MyTrip.Items.onRightClick(Items.java:196) ~[?:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor28.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.15.2.jar:git-Paper-162] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[patched_1.15.2.jar:git-Paper-162] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.15.2.jar:git-Paper-162] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.15.2.jar:git-Paper-162] at org.bukkit.craftbukkit.v1_15_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:463) ~[patched_1.15.2.jar:git-Paper-162] at org.bukkit.craftbukkit.v1_15_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:430) ~[patched_1.15.2.jar:git-Paper-162] at org.bukkit.craftbukkit.v1_15_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:426) ~[patched_1.15.2.jar:git-Paper-162] at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1421) ~[patched_1.15.2.jar:git-Paper-162] at net.minecraft.server.v1_15_R1.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:28) ~[patched_1.15.2.jar:git-Paper-162] at net.minecraft.server.v1_15_R1.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:5) ~[patched_1.15.2.jar:git-Paper-162] at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23) ~[patched_1.15.2.jar:git-Paper-162] at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) ~[patched_1.15.2.jar:git-Paper-162] at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.15.2.jar:git-Paper-162] at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.15.2.jar:git-Paper-162] at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.15.2.jar:git-Paper-162] at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:1038) ~[patched_1.15.2.jar:git-Paper-162] at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:1031) ~[patched_1.15.2.jar:git-Paper-162] at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.15.2.jar:git-Paper-162] at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:1015) ~[patched_1.15.2.jar:git-Paper-162] at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:938) ~[patched_1.15.2.jar:git-Paper-162] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
I'm running the latest version of paper, in case it's not supported.
Edit: this only seems to happen with quality 10 drugs.
Thanks for your bugreport!
I made a stupid writing issue that caused this error. This error will be fixed in next version.
I'll tell you when I upload it.
fixed it. You can download it here: https://www.spigotmc.org/resources/mytrip-amazing-drugs-in-minecraft.76816/
Thanks for your patience.