mirror of
https://github.com/aikar/commands.git
synced 2026-06-30 18:28:26 +00:00
Unknown Handlers should have priority over default.
Both conflict with each other to support parameters on @Default
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user