Skip to content
Permalink
Browse files

Fix Index out of bound error in completions for no parameter commands

  • Loading branch information...
chickeneer committed Aug 7, 2019
1 parent 91e7b9d commit ec4816fe1b70801cd3c89c40be99e581a5dc9067
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/src/main/java/co/aikar/commands/BaseCommand.java
@@ -685,7 +685,7 @@ public boolean canExecute(CommandIssuer issuer, RegisteredCommand<?> cmd) {
* @return All results to complete the command.
*/
private List<String> completeCommand(CommandIssuer issuer, RegisteredCommand cmd, String[] args, String commandLabel, boolean isAsync) {
if (!cmd.hasPermission(issuer) || args.length == 0) {
if (!cmd.hasPermission(issuer) || args.length == 0 || cmd.parameters.length == 0) {
return Collections.emptyList();
}

0 comments on commit ec4816f

Please sign in to comment.
You can’t perform that action at this time.