EternalCodeTeam / EternalCombat

⚔ Combat Logging system for Minecraft!
https://eternalcode.pl
Apache License 2.0
18 stars 5 forks source link

Missing null-checks #115

Closed P1otrulla closed 1 year ago

P1otrulla commented 1 year ago

Error

[16:38:36 ERROR]: Could not pass event EntityDamageByEntityEvent to EternalCombat v1.1.1
java.lang.NullPointerException: Cannot invoke "com.eternalcode.combat.fight.FightTag.setDeathCause(com.eternalcode.combat.fight.FightDeathCause)" because "fightTag" is null
        at com.eternalcode.combat.fight.controller.FightDeathCauseController.onEntityDamage(FightDeathCauseController.java:41) ~[EternalCombat v1.1.1.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor530.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:git-Paper-196]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.1.jar:git-Paper-196]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.1.jar:git-Paper-196]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R1.event.CraftEventFactory.callEvent(CraftEventFactory.java:264) ~[paper-1.20.1.jar:git-Paper-196]
        at org.bukkit.craftbukkit.v1_20_R1.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:1215) ~[paper-1.20.1.jar:git-Paper-196]
        at org.bukkit.craftbukkit.v1_20_R1.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:1070) ~[paper-1.20.1.jar:git-Paper-196]
        at org.bukkit.craftbukkit.v1_20_R1.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:1014) ~[paper-1.20.1.jar:git-Paper-196]
        at org.bukkit.craftbukkit.v1_20_R1.event.CraftEventFactory.handleLivingEntityDamageEvent(CraftEventFactory.java:1249) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.world.entity.LivingEntity.damageEntity0(LivingEntity.java:2184) ~[?:?]
        at net.minecraft.world.entity.player.Player.damageEntity0(Player.java:1060) ~[?:?]
        at net.minecraft.world.entity.LivingEntity.hurt(LivingEntity.java:1431) ~[?:?]
        at net.minecraft.world.entity.player.Player.hurt(Player.java:967) ~[?:?]
        at net.minecraft.server.level.ServerPlayer.hurt(ServerPlayer.java:1128) ~[?:?]
        at net.minecraft.world.entity.player.Player.attack(Player.java:1320) ~[?:?]
        at net.minecraft.server.level.ServerPlayer.attack(ServerPlayer.java:2168) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl$4.a(ServerGamePacketListenerImpl.java:2913) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundInteractPacket$1.dispatch(ServerboundInteractPacket.java:24) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundInteractPacket.dispatch(ServerboundInteractPacket.java:80) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleInteract(ServerGamePacketListenerImpl.java:2837) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundInteractPacket.handle(ServerboundInteractPacket.java:67) ~[?:?]
        at net.minecraft.network.protocol.game.ServerboundInteractPacket.handle(ServerboundInteractPacket.java:12) ~[?:?]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.1.jar:git-Paper-196]
        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:1338) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1315) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1308) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1286) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1174) ~[paper-1.20.1.jar:git-Paper-196]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-196]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]