mirror of
https://github.com/aikar/commands.git
synced 2026-06-24 07:30:38 +00:00
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:
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);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user