mirror of
https://github.com/aikar/commands.git
synced 2026-05-31 06:11:55 +00:00
Do not complete commands for which a player does not have permission
This commit is contained in:
@@ -401,7 +401,7 @@ public abstract class BaseCommand {
|
||||
|
||||
final List<String> cmds = new ArrayList<>();
|
||||
|
||||
if (search != null) {
|
||||
if (search != null && this.testPermission(sender)) {
|
||||
cmds.addAll(completeCommand(sender, search.cmd, Arrays.copyOfRange(args, search.argIndex, args.length), commandLabel));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user