Unknown Handlers should have priority over default.

Both conflict with each other to support parameters on @Default
This commit is contained in:
Aikar
2017-09-28 22:50:09 -04:00
parent 89695ad804
commit a9f203b5ef
@@ -323,14 +323,15 @@ public abstract class BaseCommand {
}
}
if (subCommands.get(DEFAULT) != null) {
if (subCommands.get(UNKNOWN) != null) {
if (!executeSubcommand(commandContext, UNKNOWN, issuer, args)) {
help(issuer, args);
}
} else if (subCommands.get(DEFAULT) != null) {
executeSubcommand(commandContext, DEFAULT, issuer, args);
return;
}
if (!executeSubcommand(commandContext, UNKNOWN, issuer, args)) {
help(issuer, args);
}
} finally {
postCommandOperation();
}