Make this possible NPE more clear.

This commit is contained in:
Olof Larsson 2013-08-09 08:35:28 +02:00
parent a9a24e6b3a
commit 0dbe943cfe

View File

@ -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());
} }