Fixed NPE

This commit is contained in:
Rammelkast committed 2016-06-01 16:02:44 +02:00
1 parent aadce168d4
commit 9f7b476068
2 files changed
+2 -2

No files matched your search

@@ -51,8 +51,6 @@ public class NPC {
}
public void destroy(Player p) {
if (!p.isOnline())
return;
((CraftPlayer)p).getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, new EntityPlayer[] { this.npc }));
((CraftPlayer)p).getHandle().playerConnection.sendPacket(new PacketPlayOutEntityDestroy(new int[] { this.npc.getId() }));
}