From 2f976705be7b68de8c115defe98552f73df38266 Mon Sep 17 00:00:00 2001 From: feildmaster Date: Fri, 27 Apr 2012 12:48:40 -0500 Subject: [PATCH] Revert "Fix potential NPE in vanish API. Fixes BUKKIT-1541" This reverts commit ebf121800bd3161e4af0f6d9229ccb39c31fc278. If the handle ever becomes null we need to know about it so we can debug it further. --- .../java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 613963fc67..ec269fcbc1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -591,10 +591,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (hiddenPlayers.containsKey(player.getName())) return; hiddenPlayers.put(player.getName(), player); - if (getHandle().netServerHandler == null) { - return; - } - //remove this player from the hidden player's EntityTrackerEntry EntityTracker tracker = ((WorldServer) entity.world).tracker; EntityPlayer other = ((CraftPlayer) player).getHandle(); @@ -613,10 +609,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (!hiddenPlayers.containsKey(player.getName())) return; hiddenPlayers.remove(player.getName()); - if (getHandle().netServerHandler == null) { - return; - } - EntityTracker tracker = ((WorldServer) entity.world).tracker; EntityPlayer other = ((CraftPlayer) player).getHandle(); EntityTrackerEntry entry = (EntityTrackerEntry) tracker.trackedEntities.get(other.id);