entity hider: check for players with no names

Not sure why this happens but we have stacktraces of isFriend crashing
due to a player not having a name (yet?). It looks like the names are
sent separately from the player spawn in the protocol.
This commit is contained in:
Adam
2018-11-07 18:05:34 -05:00
parent e187a34e3c
commit 42ad93c33c

View File

@@ -139,6 +139,12 @@ public abstract class EntityHiderMixin implements RSScene
}
}
if (player.getName() == null)
{
// player.isFriend() and player.isClanMember() npe when the player has a null name
return false;
}
return (!hideFriends && player.isFriend()) || (!isLocalPlayer && !hideClanMates && player.isClanMember());
}
}