Skip to content

Commit ae618ea

Browse files
author
wuksow
committed
fix: send command on console
1 parent ce6cf57 commit ae618ea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ public class ChatCMD implements CommandExecutor {
1414
@Override
1515
public boolean onCommand(CommandSender sender, Command cmd, String s, String[] args) {
1616
boolean zwrot = true;
17-
Player p = (Player)sender;
18-
Data data = new Data(Main.getInstance().getConfig());
1917
if (!(sender instanceof Player)) {
18+
System.out.println("This command is not for console!");
2019
return zwrot;
2120
}
21+
Player p = (Player)sender;
22+
Data data = new Data(Main.getInstance().getConfig());
2223
if (!p.hasPermission(data.getMsg("permission"))) {
2324
String msg = data.getMsg("nopermMSG");
2425
p.sendMessage(ChatColor.translateAlternateColorCodes('&', msg));

0 commit comments

Comments
 (0)