From 7535c6103dfaaf68f4a0db48a99c59d4f59a06f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Bro=C4=8Dko?= Date: Wed, 5 Sep 2018 18:57:54 +0200 Subject: [PATCH] permission check in tabComplete --- src/cz/marwland/mc/essentials/features/Borders.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cz/marwland/mc/essentials/features/Borders.java b/src/cz/marwland/mc/essentials/features/Borders.java index 60aecfc..2266664 100644 --- a/src/cz/marwland/mc/essentials/features/Borders.java +++ b/src/cz/marwland/mc/essentials/features/Borders.java @@ -103,9 +103,9 @@ public class Borders extends Feature { } @Override - public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { + public List tabComplete(CommandSender sender, String alias, String[] args) throws IllegalArgumentException { ArrayList hints = new ArrayList(); - if (args.length < 1) + if (!sender.hasPermission(this.getPermission()) || args.length < 1) return hints; String lastWord = args[args.length - 1];