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.
This commit is contained in:
feildmaster 2012-04-27 12:48:40 -05:00
parent 99aeb32d0d
commit 2f976705be

View file

@ -591,10 +591,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (hiddenPlayers.containsKey(player.getName())) return; if (hiddenPlayers.containsKey(player.getName())) return;
hiddenPlayers.put(player.getName(), player); hiddenPlayers.put(player.getName(), player);
if (getHandle().netServerHandler == null) {
return;
}
//remove this player from the hidden player's EntityTrackerEntry //remove this player from the hidden player's EntityTrackerEntry
EntityTracker tracker = ((WorldServer) entity.world).tracker; EntityTracker tracker = ((WorldServer) entity.world).tracker;
EntityPlayer other = ((CraftPlayer) player).getHandle(); EntityPlayer other = ((CraftPlayer) player).getHandle();
@ -613,10 +609,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (!hiddenPlayers.containsKey(player.getName())) return; if (!hiddenPlayers.containsKey(player.getName())) return;
hiddenPlayers.remove(player.getName()); hiddenPlayers.remove(player.getName());
if (getHandle().netServerHandler == null) {
return;
}
EntityTracker tracker = ((WorldServer) entity.world).tracker; EntityTracker tracker = ((WorldServer) entity.world).tracker;
EntityPlayer other = ((CraftPlayer) player).getHandle(); EntityPlayer other = ((CraftPlayer) player).getHandle();
EntityTrackerEntry entry = (EntityTrackerEntry) tracker.trackedEntities.get(other.id); EntityTrackerEntry entry = (EntityTrackerEntry) tracker.trackedEntities.get(other.id);