ploppyperson/StackMob-3

Exception when player has health more than 20 points

Closed this issue · 1 comments

Exception when player has health more than 20 points. Trace log says: Could not pass event EntityDeathEvent to StackMob v5.0.2
java.lang.IllegalArgumentException: Health must be between 0 and 20.0, but was 42.77480697631836. (attribute base value: 20.0)
at org.bukkit.craftbukkit.v1_15_R1.entity.CraftLivingEntity.setHealth(CraftLivingEntity.java:112) ~[patched_1.15.2.jar:git-Paper-143]

To reproduce that exception stacked mob should kill a player with health more than 20 points.

Bukkit/Spigot AND StackMob version:
Paper 1.15.2, build 143
StackMob ver. 5.0.2

Full error log:```

.... [21:07:19 ERROR]: Could not pass event EntityDeathEvent to StackMob v5.0.2
java.lang.IllegalArgumentException: Health must be between 0 and 20.0, but was 42.77480697631836. (attribute base value: 20.0)
at org.bukkit.craftbukkit.v1_15_R1.entity.CraftLivingEntity.setHealth(CraftLivingEntity.java:112) ~[patched_1.15.2.jar:git-Paper-143]
at uk.antiperson.stackmob.entity.death.KillStepDamage.onSpawn(KillStepDamage.java:30) ~[?:?]
at uk.antiperson.stackmob.listeners.DeathListener.onStackDeath(DeathListener.java:38) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor532.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.15.2.jar:git-Paper-143]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.15.2.jar:git-Paper-143]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.15.2.jar:git-Paper-143]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:559) ~[patched_1.15.2.jar:git-Paper-143]
at org.bukkit.craftbukkit.v1_15_R1.event.CraftEventFactory.callEntityDeathEvent(CraftEventFactory.java:759) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.EntityLiving.d(EntityLiving.java:1380) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.EntityLiving.die(EntityLiving.java:1308) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.EntityLiving.damageEntity(EntityLiving.java:1152) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.EntityMonster.damageEntity(EntityMonster.java:52) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.EntityZombie.damageEntity(EntityZombie.java:318) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.EntityPigZombie.damageEntity(EntityPigZombie.java:138) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.EntityHuman.attack(EntityHuman.java:1113) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.EntityPlayer.attack(EntityPlayer.java:1700) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:2054) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.PacketPlayInUseEntity.a(PacketPlayInUseEntity.java:51) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.PacketPlayInUseEntity.a(PacketPlayInUseEntity.java:6) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:1038) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:1031) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:1102) ~[patched_1.15.2.jar:git-Paper-143]
at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:934) ~[patched_1.15.2.jar:git-Paper-143]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]