From e54b54bac08601c36bd38c201b1601ce7d8eae3e Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Thu, 15 Dec 2016 18:24:56 +0100 Subject: [PATCH] Fixed/finished cmd system... --- src/main/java/buttondevteam/lib/chat/TBMCChatAPI.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/buttondevteam/lib/chat/TBMCChatAPI.java b/src/main/java/buttondevteam/lib/chat/TBMCChatAPI.java index 0d81794..3a4c71d 100644 --- a/src/main/java/buttondevteam/lib/chat/TBMCChatAPI.java +++ b/src/main/java/buttondevteam/lib/chat/TBMCChatAPI.java @@ -15,6 +15,7 @@ import org.reflections.scanners.SubTypesScanner; import org.reflections.util.ClasspathHelper; import org.reflections.util.ConfigurationBuilder; +import buttondevteam.core.CommandCaller; import buttondevteam.core.MainPlugin; import buttondevteam.lib.TBMCChatEvent; import buttondevteam.lib.TBMCCoreAPI; @@ -102,6 +103,7 @@ public class TBMCChatAPI { if (!CheckForNulls(plugin, c)) continue; commands.put(c.GetCommandPath(), c); + CommandCaller.RegisterCommand(c); } catch (InstantiationException e) { TBMCCoreAPI.SendException("An error occured while registering command " + cmd.getName(), e); } catch (IllegalAccessException e) { @@ -139,6 +141,7 @@ public class TBMCChatAPI { if (!CheckForNulls(plugin, c)) return; commands.put(c.GetCommandPath(), c); + CommandCaller.RegisterCommand(c); } catch (Exception e) { TBMCCoreAPI.SendException("An error occured while registering command " + thecmdclass.getSimpleName(), e); } @@ -167,6 +170,7 @@ public class TBMCChatAPI { try { cmd.plugin = plugin; commands.put(cmd.GetCommandPath(), cmd); + CommandCaller.RegisterCommand(cmd); } catch (Exception e) { TBMCCoreAPI.SendException("An error occured while registering command " + cmd.GetCommandPath(), e); }