mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 04:56:50 +01:00
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:
parent
99aeb32d0d
commit
2f976705be
1 changed files with 0 additions and 8 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue