mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Fixed NPE
This commit is contained in:
1 parent
d04c27828f
commit
aadce168d4
1 file changed
+2
@@ -51,6 +51,8 @@ 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() }));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user