From 4cd9f3e551441d96f3fe319c4ce66913ee801523 Mon Sep 17 00:00:00 2001 From: Pepich Date: Wed, 1 Feb 2017 17:44:33 +0100 Subject: [PATCH] Made Loader register the commands on load --- src/com/redstoner/coremods/ModuleLoader/ModuleLoader.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/redstoner/coremods/ModuleLoader/ModuleLoader.java b/src/com/redstoner/coremods/ModuleLoader/ModuleLoader.java index 9aab74a..033b371 100644 --- a/src/com/redstoner/coremods/ModuleLoader/ModuleLoader.java +++ b/src/com/redstoner/coremods/ModuleLoader/ModuleLoader.java @@ -49,7 +49,9 @@ public final class ModuleLoader implements CoreModule Debugger.notifyMethod(clazz); try { - modules.add(clazz.newInstance()); + Module module = clazz.newInstance(); + modules.add(module); + CommandManager.registerCommand(module.getCommandString(), module, Main.plugin); } catch (InstantiationException | IllegalAccessException e) {