Do not displaying "Not online" message in console
This commit is contained in:
parent
6f0075b57a
commit
6202a0ee12
@ -46,7 +46,9 @@ public class SimplyRank extends JavaPlugin implements CommandExecutor {
|
|||||||
sender.sendMessage(ChatColor.RED + "Wrong syntax! Usage: /rank [Player] [Rank]");
|
sender.sendMessage(ChatColor.RED + "Wrong syntax! Usage: /rank [Player] [Rank]");
|
||||||
return true;
|
return true;
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
sender.sendMessage(ChatColor.RED + "That player is not online!");
|
if (sender instanceof Player) {
|
||||||
|
sender.sendMessage(ChatColor.RED + "That player is not online!");
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user