Register SubClasses before Command register() (#169)

This is so the SubCommands from the SubClasses get added to the SubCommand map before calling **addChild()**
This commit is contained in:
Diego Arias
2018-09-01 21:27:55 -03:00
committed by Daniel Ennis
parent 9568e654e9
commit 82aaf9b701
@@ -233,6 +233,7 @@ public abstract class BaseCommand {
this.conditions = annotations.getAnnotationValue(self, Conditions.class, Annotations.REPLACEMENTS | Annotations.NO_EMPTY);
registerSubcommands();
registerSubclasses(cmd);
if (cmdAliases != null) {
Set<String> cmdList = new HashSet<>();
@@ -246,8 +247,6 @@ public abstract class BaseCommand {
if (cmd != null) {
register(cmd, this);
}
registerSubclasses(cmd);
}
/**