Badbird5907 / AntiCombatLog

https://ci.badbird5907.net/job/AntiCombatLog/
5 stars 7 forks source link

[Bug?] Could not pass event Error #9

Closed Yurinann closed 2 years ago

Yurinann commented 2 years ago
[17:49:54 ERROR]: Could not pass event EntityDamageByEntityEvent to AntiCombatLog v2.2.5
java.lang.NullPointerException: Cannot invoke "org.bukkit.entity.Entity.getUniqueId()" because the return value of "net.citizensnpcs.api.npc.NPC.getEntity()" is null
        at net.badbird5907.anticombatlog.manager.NPCManager.lambda$damaged$1(NPCManager.java:116) ~[AntiCombatLog-2.2.5.jar:?]
        at java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4780) ~[?:?]
        at net.badbird5907.anticombatlog.manager.NPCManager.damaged(NPCManager.java:115) ~[AntiCombatLog-2.2.5.jar:?]
        at net.badbird5907.anticombatlog.listener.CombatListener.onDamage(CombatListener.java:31) ~[AntiCombatLog-2.2.5.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor352.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:75) ~[pufferfish-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[pufferfish-api-1.18.1-R0.1-SNAPSHOT.jar:git-Pufferfish-46]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[pufferfish-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:630) ~[pufferfish-api-1.18.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_18_R1.event.CraftEventFactory.callEvent(CraftEventFactory.java:247) ~[pufferfish-1.18.1.jar:git-Pufferfish-46]
        at org.bukkit.craftbukkit.v1_18_R1.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:1141) ~[pufferfish-1.18.1.jar:git-Pufferfish-46]
        at org.bukkit.craftbukkit.v1_18_R1.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:1000) ~[pufferfish-1.18.1.jar:git-Pufferfish-46]
        at org.bukkit.craftbukkit.v1_18_R1.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:954) ~[pufferfish-1.18.1.jar:git-Pufferfish-46]
        at org.bukkit.craftbukkit.v1_18_R1.event.CraftEventFactory.handleLivingEntityDamageEvent(CraftEventFactory.java:1175) ~[pufferfish-1.18.1.jar:git-Pufferfish-46]
        at net.minecraft.world.entity.LivingEntity.damageEntity0(LivingEntity.java:2074) ~[?:?]
        at net.minecraft.world.entity.player.Player.damageEntity0(Player.java:1015) ~[?:?]
        at net.minecraft.world.entity.LivingEntity.hurt(LivingEntity.java:1350) ~[?:?]
        at net.minecraft.world.entity.player.Player.hurt(Player.java:922) ~[?:?]
        at net.minecraft.server.level.ServerPlayer.hurt(ServerPlayer.java:1027) ~[?:?]
        at net.citizensnpcs.nms.v1_18_R1.entity.EntityHumanNPC.a(EntityHumanNPC.java:303) ~[Citizens-2.0.29-b2471.jar:?]
        at net.minecraft.world.entity.player.Player.attack(Player.java:1262) ~[?:?]
        at net.minecraft.server.level.ServerPlayer.attack(ServerPlayer.java:2035) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl$5.a(ServerGamePacketListenerImpl.java:2528) ~[?:?]
        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:2455) ~[?:?]
        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$1(PacketUtils.java:56) ~[?:?]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[pufferfish-1.18.1.jar:git-Pufferfish-46]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:149) ~[?:?]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) ~[?:?]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1416) ~[pufferfish-1.18.1.jar:git-Pufferfish-46]
        at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:189) ~[pufferfish-1.18.1.jar:git-Pufferfish-46]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:122) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1393) ~[pufferfish-1.18.1.jar:git-Pufferfish-46]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1386) ~[pufferfish-1.18.1.jar:git-Pufferfish-46]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:132) ~[?:?]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1364) ~[pufferfish-1.18.1.jar:git-Pufferfish-46]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1270) ~[pufferfish-1.18.1.jar:git-Pufferfish-46]
        at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:319) ~[pufferfish-1.18.1.jar:git-Pufferfish-46]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Checking version, please wait... This server is running Pufferfish version git-Pufferfish-46 (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT) (Git: 434f1eb on HEAD) You are on the latest version! Previous version: git-Paper-794 (MC: 1.16.5)

Badbird5907 commented 2 years ago

Sorry, didn't see this i'll have a look at it

Badbird5907 commented 2 years ago

do you have the newest version of citizens? & are there any errors above this?

Badbird5907 commented 2 years ago

Looks like it happened again, i'll add a null check https://mclo.gs/4cBff2n

Badbird5907 commented 2 years ago

Fixed in 1b7f23c294f51fe51d3adee4b918855a6b8be0af