Open toppev opened 3 years ago
Actionhealth throws and exception when it tries to send the action bar to a citizens bot. It should check the player#isOnline for example
player#isOnline
[14:38:48] [Server thread/WARN]: java.lang.NoSuchFieldException: playerConnection [14:38:48] [Server thread/WARN]: at java.lang.Class.getDeclaredField(Class.java:2070) [14:38:48] [Server thread/WARN]: at com.zeshanaslam.actionhealth.utils.HealthUtil.sendActionBar(HealthUtil.java:292) [14:38:48] [Server thread/WARN]: at com.zeshanaslam.actionhealth.utils.HealthUtil.sendHealth(HealthUtil.java:77) [14:38:48] [Server thread/WARN]: at com.zeshanaslam.actionhealth.events.HealthListeners.onDamage(HealthListeners.java:57) [14:38:48] [Server thread/WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [14:38:48] [Server thread/WARN]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [14:38:48] [Server thread/WARN]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [14:38:48] [Server thread/WARN]: at java.lang.reflect.Method.invoke(Method.java:498) [14:38:48] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) [14:38:48] [Server thread/WARN]: at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [14:38:48] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [14:38:48] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [14:38:48] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.callEvent(CraftEventFactory.java:87) [14:38:48] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:553) [14:38:48] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:466) [14:38:48] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.handleLivingEntityDamageEvent(CraftEventFactory.java:585) [14:38:48] [Server thread/WARN]: at net.minecraft.server.v1_8_R3.EntityLiving.d(EntityLiving.java:1102) [14:38:48] [Server thread/WARN]: at net.minecraft.server.v1_8_R3.EntityHuman.d(EntityHuman.java:859) [14:38:48] [Server thread/WARN]: at net.minecraft.server.v1_8_R3.EntityLiving.damageEntity(EntityLiving.java:743) [14:38:48] [Server thread/WARN]: at net.minecraft.server.v1_8_R3.EntityHuman.damageEntity(EntityHuman.java:800) [14:38:48] [Server thread/WARN]: at net.minecraft.server.v1_8_R3.EntityPlayer.damageEntity(EntityPlayer.java:496) [14:38:48] [Server thread/WARN]: at net.minecraft.server.v1_8_R3.EntityHuman.attack(EntityHuman.java:1001) [14:38:48] [Server thread/WARN]: at net.minecraft.server.v1_8_R3.EntityPlayer.attack(EntityPlayer.java:1063) [14:38:48] [Server thread/WARN]: at net.citizensnpcs.nms.v1_8_R3.util.NMSImpl.attack(NMSImpl.java:203) [14:38:48] [Server thread/WARN]: at net.citizensnpcs.util.NMS.attack(NMS.java:50) [14:38:48] [Server thread/WARN]: at net.citizensnpcs.npc.ai.MCTargetStrategy$1.handle(MCTargetStrategy.java:199) [14:38:48] [Server thread/WARN]: at net.citizensnpcs.npc.ai.MCTargetStrategy.update(MCTargetStrategy.java:127) [14:38:48] [Server thread/WARN]: at net.citizensnpcs.npc.ai.CitizensNavigator.run(CitizensNavigator.java:160) [14:38:48] [Server thread/WARN]: at net.citizensnpcs.npc.CitizensNPC.update(CitizensNPC.java:289) [14:38:48] [Server thread/WARN]: at net.citizensnpcs.nms.v1_8_R3.entity.EntityHumanNPC.t_(EntityHumanNPC.java:404) [14:38:48] [Server thread/WARN]: at net.minecraft.server.v1_8_R3.World.entityJoinedWorld(World.java:1607) [14:38:48] [Server thread/WARN]: at net.minecraft.server.v1_8_R3.World.g(World.java:1582) [14:38:48] [Server thread/WARN]: at net.minecraft.server.v1_8_R3.World.tickEntities(World.java:1425) [14:38:48] [Server thread/WARN]: at net.minecraft.server.v1_8_R3.WorldServer.tickEntities(WorldServer.java:597) [14:38:48] [Server thread/WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:786) [14:38:48] [Server thread/WARN]: at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [14:38:48] [Server thread/WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [14:38:48] [Server thread/WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [14:38:48] [Server thread/WARN]: at java.lang.Thread.run(Thread.java:748)
Actionhealth throws and exception when it tries to send the action bar to a citizens bot.
It should check the
player#isOnline
for example