mirror of
https://github.com/aikar/commands.git
synced 2026-05-31 06:11:55 +00:00
Fix Index out of bound error in completions for no parameter commands
This commit is contained in:
@@ -685,7 +685,7 @@ public abstract class BaseCommand {
|
||||
* @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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user