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:
Ursprung
99aeb32d0d
Commit
2f976705be
@ -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);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren