Make this possible NPE more clear.
This commit is contained in:
parent
a9a24e6b3a
commit
0dbe943cfe
@ -115,6 +115,7 @@ public class PlayerUtil implements Listener
|
|||||||
|
|
||||||
public static boolean isJoined(Player player)
|
public static boolean isJoined(Player player)
|
||||||
{
|
{
|
||||||
|
if (player == null) throw new NullPointerException("player was null");
|
||||||
return joinedPlayerNames.contains(player.getName());
|
return joinedPlayerNames.contains(player.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user