Skultrix
11/8/2017 - 9:57 AM

Player Null Checker

Use this code to check if a player is null or valid.


Player target = Bukkit.getServer().getPlayer(args[1]);

if (target == null) {
  
  //Send message that the player is null.
  
} else {
  
  //Continue with your code.
  
}