Skip to content

Commit ce6cf57

Browse files
author
wuksow
committed
feature: add console check
1 parent ffa7f73 commit ce6cf57

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/rcode/chat/cmd/ChatCMD.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ public boolean onCommand(CommandSender sender, Command cmd, String s, String[] a
1616
boolean zwrot = true;
1717
Player p = (Player)sender;
1818
Data data = new Data(Main.getInstance().getConfig());
19+
if (!(sender instanceof Player)) {
20+
return zwrot;
21+
}
1922
if (!p.hasPermission(data.getMsg("permission"))) {
2023
String msg = data.getMsg("nopermMSG");
2124
p.sendMessage(ChatColor.translateAlternateColorCodes('&', msg));

0 commit comments

Comments
 (0)