chrismin13/AdditionsAPI

PlayerDeathEvent NullPointerException

poma123 opened this issue · 2 comments

03.07 09:14:28 [Server] ERROR Could not pass event PlayerDeathEvent to AdditionsAPI v1.2.10
03.07 09:14:28 [Server] INFO org.bukkit.event.EventException: null
03.07 09:14:28 [Server] INFO at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:72) ~[patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:527) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:512) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at org.bukkit.craftbukkit.v1_12_R1.event.CraftEventFactory.callPlayerDeathEvent(CraftEventFactory.java:414) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.EntityPlayer.die(EntityPlayer.java:458) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.EntityLiving.damageEntity(EntityLiving.java:979) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.EntityHuman.damageEntity(EntityHuman.java:766) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.EntityPlayer.damageEntity(EntityPlayer.java:612) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.Entity.burnFromLava(Entity.java:513) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.Entity.Y(Entity.java:466) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.EntityLiving.Y(EntityLiving.java:206) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.Entity.B_(Entity.java:339) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.EntityLiving.B_(EntityLiving.java:1915) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.EntityHuman.B_(EntityHuman.java:146) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.EntityPlayer.playerTick(EntityPlayer.java:339) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.PlayerConnection.e(PlayerConnection.java:143) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.NetworkManager.a(NetworkManager.java:255) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.ServerConnection.c(ServerConnection.java:150) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:941) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:427) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:767) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:665) [patched_1.12.2.jar:git-Paper-1468]
03.07 09:14:28 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171]
03.07 09:14:28 [Server] INFO Caused by: java.lang.NullPointerException
03.07 09:14:28 [Server] INFO at com.chrismin13.additionsapi.listeners.vanilla.PlayerDeath.onPlayerDeath(PlayerDeath.java:20) ~[?:?]
03.07 09:14:28 [Server] INFO at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor63.execute(Unknown Source) ~[?:?]

At PlayerDeath.java line 20:

for (CustomItem cItem : AdditionsAPI.getAllCustomItems()) {

Someone was killed before the Additions API had finished initializing, so this is to be expected. Doesn't affect functionality in any way and won't happen once the Additions API has loaded.

Or did you have no supported plugins perhaps? If you could give me a bit more info I could hopefully help you out.

It's interesting, I didn't get this error after I opened this issue.