-
Bug
-
Resolution: Won't Fix
-
Major
-
None
-
None
-
CraftBukkit version git-Spigot-8a048fe-5ff377a (MC: 1.9.4) (Implementing API version 1.9.4-R0.1-SNAPSHOT)
I just switched from 1.9.2 to 1.9.4 and ran into an issue. Apparently removing potion effect at PlayerSpawnLocationEvent causes NPE. This was not the case at 1.9.2.
Log:
Could not pass event PlayerSpawnLocationEvent to BirthrightEngine v1.0
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[server.jar:git-Spigot-8a048fe-5ff377a]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[server.jar:git-Spigot-8a048fe-5ff377a]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [server.jar:git-Spigot-8a048fe-5ff377a]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [server.jar:git-Spigot-8a048fe-5ff377a]
at net.minecraft.server.v1_9_R2.PlayerList.a(PlayerList.java:114) [server.jar:git-Spigot-8a048fe-5ff377a]
at net.minecraft.server.v1_9_R2.LoginListener.b(LoginListener.java:144) [server.jar:git-Spigot-8a048fe-5ff377a]
at net.minecraft.server.v1_9_R2.LoginListener.c(LoginListener.java:54) [server.jar:git-Spigot-8a048fe-5ff377a]
at net.minecraft.server.v1_9_R2.NetworkManager.a(NetworkManager.java:233) [server.jar:git-Spigot-8a048fe-5ff377a]
at net.minecraft.server.v1_9_R2.ServerConnection.c(ServerConnection.java:140) [server.jar:git-Spigot-8a048fe-5ff377a]
at net.minecraft.server.v1_9_R2.MinecraftServer.D(MinecraftServer.java:825) [server.jar:git-Spigot-8a048fe-5ff377a]
at net.minecraft.server.v1_9_R2.DedicatedServer.D(DedicatedServer.java:399) [server.jar:git-Spigot-8a048fe-5ff377a]
at net.minecraft.server.v1_9_R2.MinecraftServer.C(MinecraftServer.java:665) [server.jar:git-Spigot-8a048fe-5ff377a]
at net.minecraft.server.v1_9_R2.MinecraftServer.run(MinecraftServer.java:564) [server.jar:git-Spigot-8a048fe-5ff377a]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_66]
Caused by: java.lang.NullPointerException
at net.minecraft.server.v1_9_R2.EntityPlayer.b(EntityPlayer.java:962) ~[server.jar:git-Spigot-8a048fe-5ff377a]
at net.minecraft.server.v1_9_R2.EntityLiving.removeEffect(EntityLiving.java:693) ~[server.jar:git-Spigot-8a048fe-5ff377a]
at org.bukkit.craftbukkit.v1_9_R2.entity.CraftLivingEntity.removePotionEffect(CraftLivingEntity.java:317) ~[server.jar:git-Spigot-8a048fe-5ff377a]
at net.birthright.engine.player.helper.PlayerHelper.ResetPlayer(PlayerHelper.java:33) ~[?:?]
at net.birthright.engine.player.PlayerManager.OnEvent(PlayerManager.java:98) ~[?:?]
at net.birthright.event.EventSystem.onPlayerSpawnLocation(EventSystem.java:127) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_66]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_66]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[server.jar:git-Spigot-8a048fe-5ff377a]
Code at that line:
for(PotionEffect effect : player.getActivePotionEffects())
{ player.removePotionEffect(effect.getType()); }