mirror of
https://github.com/aikar/commands.git
synced 2026-06-29 18:08:25 +00:00
also check RegisterCommand for Permission on completions
This commit is contained in:
@@ -428,7 +428,7 @@ public abstract class BaseCommand {
|
||||
}
|
||||
|
||||
private List<String> completeCommand(CommandIssuer sender, RegisteredCommand cmd, String[] args, String commandLabel) {
|
||||
if (!this.testPermission(sender) || args.length > cmd.requiredResolvers + cmd.optionalResolvers || args.length == 0
|
||||
if (!this.testPermission(sender) || !cmd.hasPermission(sender) || args.length > cmd.requiredResolvers + cmd.optionalResolvers || args.length == 0
|
||||
|| cmd.complete == null) {
|
||||
return ImmutableList.of();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user