Adding a bit of Fail Fast.

This commit is contained in:
Olof Larsson 2016-05-31 09:25:45 +02:00
parent 4452ebc392
commit 982c8de90f
No known key found for this signature in database
GPG Key ID: BBEF14F97DA52474

View File

@ -40,11 +40,13 @@ public enum PlayerState
public static PlayerState get(UUID id) public static PlayerState get(UUID id)
{ {
if (id == null) throw new NullPointerException("id");
return EngineMassiveCorePlayerState.get().getState(id); return EngineMassiveCorePlayerState.get().getState(id);
} }
public static PlayerState get(Player player) public static PlayerState get(Player player)
{ {
if (player == null) throw new NullPointerException("player");
return EngineMassiveCorePlayerState.get().getState(player); return EngineMassiveCorePlayerState.get().getState(player);
} }