permission check in tabComplete

This commit is contained in:
Erik Bročko 2018-09-05 18:57:54 +02:00
parent 91460c8367
commit 7535c6103d

View File

@ -105,7 +105,7 @@ public class Borders extends Feature {
@Override
public List<String> tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException {
ArrayList<String> hints = new ArrayList<String>();
if (args.length < 1)
if (!sender.hasPermission(this.getPermission()) || args.length < 1)
return hints;
String lastWord = args[args.length - 1];