0

Made Loader register the commands on load

This commit is contained in:
Pepich 2017-02-01 17:44:33 +01:00
parent 1917a08d14
commit 4cd9f3e551

View File

@ -49,7 +49,9 @@ public final class ModuleLoader implements CoreModule
Debugger.notifyMethod(clazz); Debugger.notifyMethod(clazz);
try try
{ {
modules.add(clazz.newInstance()); Module module = clazz.newInstance();
modules.add(module);
CommandManager.registerCommand(module.getCommandString(), module, Main.plugin);
} }
catch (InstantiationException | IllegalAccessException e) catch (InstantiationException | IllegalAccessException e)
{ {