mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-09 01:47:54 +01:00
Fix subcommand query
This commit is contained in:
parent
7cfa07f2e0
commit
db02e93429
@ -38,10 +38,11 @@ public class CommandParser {
|
||||
if (commandQueryResult.args.length > 0) {
|
||||
final String firstArgument = commandQueryResult.args[0];
|
||||
for (Command subcommand : command.getSubcommands()) {
|
||||
correct = Command.isValidName(subcommand, firstArgument);
|
||||
commandQueryResult.command = subcommand;
|
||||
commandQueryResult.commandName = firstArgument;
|
||||
commandQueryResult.args = Arrays.copyOfRange(args, 1, args.length);
|
||||
if ((correct = Command.isValidName(subcommand, firstArgument))) {
|
||||
commandQueryResult.command = subcommand;
|
||||
commandQueryResult.commandName = firstArgument;
|
||||
commandQueryResult.args = Arrays.copyOfRange(args, 1, args.length);
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (correct);
|
||||
|
Loading…
Reference in New Issue
Block a user