Archiviert
13
0

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.
Dieser Commit ist enthalten in:
feildmaster 2012-04-27 12:48:40 -05:00
Ursprung 99aeb32d0d
Commit 2f976705be

Datei anzeigen

@ -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);