From 9adf449ef2714739b8a443a98622c500d8373c56 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Thu, 3 Nov 2016 22:03:12 +0100 Subject: [PATCH] Fixed onCommand... --- .../java/buttondevteam/chat/commands/CommandCaller.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/buttondevteam/chat/commands/CommandCaller.java b/src/main/java/buttondevteam/chat/commands/CommandCaller.java index ee35690..58cdccc 100644 --- a/src/main/java/buttondevteam/chat/commands/CommandCaller.java +++ b/src/main/java/buttondevteam/chat/commands/CommandCaller.java @@ -59,11 +59,11 @@ public class CommandCaller implements CommandExecutor { public boolean onCommand(CommandSender sender, Command command, String alias, String[] args) { String path = command.getName(); for (String arg : args) - path += "/" + arg; + path += " " + arg; TBMCCommandBase cmd = TBMCChatAPI.GetCommands().get(path); int argc = 0; - while (cmd == null && path.contains("/")) { - path = path.substring(0, path.lastIndexOf('/')); + while (cmd == null && path.contains(" ")) { + path = path.substring(0, path.lastIndexOf(' ')); argc++; cmd = TBMCChatAPI.GetCommands().get(path); }