From fe49c54a0db3c09a1174786ed4bdaf7088fbba84 Mon Sep 17 00:00:00 2001 From: Paul Vogel Date: Sun, 6 Oct 2019 22:26:58 +0200 Subject: [PATCH] Stop command execution after message "Only players can do this command!" --- .../com/greatmancode/craftconomy3/tools/commands/SubCommand.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/greatmancode/craftconomy3/tools/commands/SubCommand.java b/src/main/java/com/greatmancode/craftconomy3/tools/commands/SubCommand.java index 3ba9e942..d513d21d 100644 --- a/src/main/java/com/greatmancode/craftconomy3/tools/commands/SubCommand.java +++ b/src/main/java/com/greatmancode/craftconomy3/tools/commands/SubCommand.java @@ -89,6 +89,7 @@ protected void executeCommand(Command command, CommandSender sender, String[] ar if (sender instanceof ConsoleCommandSender) { if (cmd.playerOnly()) { commandHandler.getServerCaller().getPlayerCaller().sendMessage(sender, "{{DARK_RED}}Only players can do this command!", getName()); + return; } } if (commandHandler.getServerCaller().getPlayerCaller().checkPermission(sender.getUuid(), cmd.getPermissionNode())) {