From 88857e015d3be6f894592204d76d8580eae0ac9b Mon Sep 17 00:00:00 2001 From: Luck Date: Wed, 17 Apr 2019 10:06:47 +0100 Subject: Fix permission checking --- .../src/main/java/me/lucko/spark/bukkit/SparkBukkitPlugin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'spark-bukkit/src/main/java/me/lucko') diff --git a/spark-bukkit/src/main/java/me/lucko/spark/bukkit/SparkBukkitPlugin.java b/spark-bukkit/src/main/java/me/lucko/spark/bukkit/SparkBukkitPlugin.java index 1fcb571..c713a2c 100644 --- a/spark-bukkit/src/main/java/me/lucko/spark/bukkit/SparkBukkitPlugin.java +++ b/spark-bukkit/src/main/java/me/lucko/spark/bukkit/SparkBukkitPlugin.java @@ -102,8 +102,9 @@ public class SparkBukkitPlugin extends JavaPlugin implements SparkPlugin getSenders() { + public Set getSendersWithPermission(String permission) { Set senders = new HashSet<>(getServer().getOnlinePlayers()); + senders.removeIf(sender -> !sender.hasPermission(permission)); senders.add(getServer().getConsoleSender()); return senders; } -- cgit