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