geforkt von Mirrors/Paper
Fix potential NPE in vanish API. Fixes BUKKIT-1541
By: Travis Watkins <amaranth@ubuntu.com>
Dieser Commit ist enthalten in:
Ursprung
529ff54e26
Commit
ff8b2d38f9
@ -596,6 +596,10 @@ 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();
|
||||
@ -614,6 +618,10 @@ 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);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren