mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-23 16:41:35 +01:00
CommandParser#findCommand style cleanup
This commit is contained in:
parent
1e138c5db9
commit
9817919988
@ -31,8 +31,9 @@ public class CommandParser {
|
||||
commandQueryResult.commandName = commandName;
|
||||
commandQueryResult.args = args;
|
||||
|
||||
if (commandQueryResult.args.length > 0) {
|
||||
final String subCommandName = commandQueryResult.args[0];
|
||||
// Search for subcommand
|
||||
if (args.length > 0) {
|
||||
final String subCommandName = args[0];
|
||||
for (Command subcommand : command.getSubcommands()) {
|
||||
if (Command.isValidName(subcommand, subCommandName)) {
|
||||
final String[] subArgs = Arrays.copyOfRange(args, 1, args.length);
|
||||
|
Loading…
Reference in New Issue
Block a user