Do not displaying "Not online" message in console

This commit is contained in:
Michel Roux 2012-05-11 21:50:01 +02:00
parent 6f0075b57a
commit 6202a0ee12

View File

@ -46,7 +46,9 @@ public class SimplyRank extends JavaPlugin implements CommandExecutor {
sender.sendMessage(ChatColor.RED + "Wrong syntax! Usage: /rank [Player] [Rank]");
return true;
} catch (NullPointerException e) {
if (sender instanceof Player) {
sender.sendMessage(ChatColor.RED + "That player is not online!");
}
return true;
}
}