mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-29 12:37:37 +01:00
Fixes an ArrayOutOfBoundsException when command was at "top" level
This commit is contained in:
parent
f8a7c1af48
commit
89b4b80208
@ -198,7 +198,7 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
|
||||
return false;
|
||||
}
|
||||
// Execute and trim args
|
||||
return cmd.execute(user, args[cmd.subCommandLevel-1], Arrays.asList(args).subList(cmd.subCommandLevel, args.length));
|
||||
return cmd.execute(user, (cmd.subCommandLevel > 0) ? args[cmd.subCommandLevel-1] : label, Arrays.asList(args).subList(cmd.subCommandLevel, args.length));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user