mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-09 09:57:45 +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) {
|
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user