Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When a player kills a Citizens NPC an error occurs. #17

Open
RealTriassic opened this issue Aug 27, 2022 · 0 comments
Open

When a player kills a Citizens NPC an error occurs. #17

RealTriassic opened this issue Aug 27, 2022 · 0 comments

Comments

@RealTriassic
Copy link

Bug Report 🐛

Plugin Version

v1.5.6

Server Version

Purpur 1.19.2

StackTrace

[06:31:44 ERROR]: Could not pass event PlayerDeathEvent to HeadDrops v1.5.6
java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.toString()" because "replacement" is null
        at java.lang.String.replace(String.java:2956) ~[?:?]
        at com.github.evancolewright.headdrops.utilities.HeadUtils.replacePlaceHolders(HeadUtils.java:38) ~[HeadDrops-1.5.6.jar:?]
        at com.github.evancolewright.headdrops.utilities.HeadUtils.createPlayerHead(HeadUtils.java:24) ~[HeadDrops-1.5.6.jar:?]
        at com.github.evancolewright.headdrops.HeadDropsListeners.onPlayerDeath(HeadDropsListeners.java:46) ~[HeadDrops-1.5.6.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor65.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:75) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:git-Purpur-1768]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:678) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_19_R1.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:914) ~[purpur-1.19.2.jar:git-Purpur-1768]
        at net.minecraft.server.level.ServerPlayer.die(ServerPlayer.java:895) ~[?:?]
        at net.citizensnpcs.nms.v1_19_R1.entity.EntityHumanNPC.a(EntityHumanNPC.java:146) ~[Citizens-#2673.jar:?]
        at net.minecraft.world.entity.LivingEntity.hurt(LivingEntity.java:1515) ~[?:?]
        at net.minecraft.world.entity.player.Player.hurt(Player.java:1023) ~[?:?]
        at net.minecraft.server.level.ServerPlayer.hurt(ServerPlayer.java:1075) ~[?:?]
        at net.citizensnpcs.nms.v1_19_R1.entity.EntityHumanNPC.a(EntityHumanNPC.java:292) ~[Citizens-#2673.jar:?]
        at net.minecraft.world.entity.player.Player.attack(Player.java:1363) ~[?:?]
        at net.minecraft.server.level.ServerPlayer.attack(ServerPlayer.java:2176) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl$6.a(ServerGamePacketListenerImpl.java:3086) ~[?:?]
        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:3006) ~[?:?]
        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) ~[purpur-1.19.2.jar:git-Purpur-1768]
        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:1388) ~[purpur-1.19.2.jar:git-Purpur-1768]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:185) ~[purpur-1.19.2.jar:git-Purpur-1768]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1365) ~[purpur-1.19.2.jar:git-Purpur-1768]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1358) ~[purpur-1.19.2.jar:git-Purpur-1768]
        at net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:114) ~[?:?]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1492) ~[purpur-1.19.2.jar:git-Purpur-1768]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1214) ~[purpur-1.19.2.jar:git-Purpur-1768]
        at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:310) ~[purpur-1.19.2.jar:git-Purpur-1768]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Steps to Reproduce

  1. Add Citizens to your server
  2. Create an NPC
  3. Set it to vulnerable using /npc vulnerable
  4. Kill it using a sword
  5. Observe.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant