From d99f16350089db783d8b953912c63c78ce42eb1d Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Thu, 3 Nov 2016 18:24:13 +0100 Subject: [PATCH] Changed command paths --- src/main/java/buttondevteam/lib/chat/TBMCChatAPI.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/buttondevteam/lib/chat/TBMCChatAPI.java b/src/main/java/buttondevteam/lib/chat/TBMCChatAPI.java index b14da5c..868d391 100644 --- a/src/main/java/buttondevteam/lib/chat/TBMCChatAPI.java +++ b/src/main/java/buttondevteam/lib/chat/TBMCChatAPI.java @@ -33,11 +33,11 @@ public class TBMCChatAPI { ArrayList cmds = new ArrayList(); cmds.add("ยง6---- Subcommands ----"); for (TBMCCommandBase cmd : TBMCChatAPI.GetCommands().values()) { - if (cmd.GetCommandPath().startsWith(command.GetCommandPath() + "/")) { + if (cmd.GetCommandPath().startsWith(command.GetCommandPath() + " ")) { int ind = cmd.GetCommandPath().indexOf('/', command.GetCommandPath().length() + 2); if (ind >= 0) continue; - cmds.add(cmd.GetCommandPath().replace('/', ' ')); + cmds.add("/" + cmd.GetCommandPath()); } } return cmds.toArray(new String[cmds.size()]); @@ -133,7 +133,7 @@ public class TBMCChatAPI { * The command to add */ public static void AddCommand(JavaPlugin plugin, TBMCCommandBase cmd) { - plugin.getLogger().info("Registering command " + cmd.GetCommandPath() + " for " + plugin.getName()); + plugin.getLogger().info("Registering command /" + cmd.GetCommandPath() + " for " + plugin.getName()); try { cmd.plugin = plugin; commands.put(cmd.GetCommandPath(), cmd);