CommandParser#findCommand style cleanup

This commit is contained in:
themode 2021-03-21 09:25:22 +01:00
parent 1e138c5db9
commit 9817919988

View File

@ -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);