diff options
author | Luck <git@lucko.me> | 2019-04-17 10:06:47 +0100 |
---|---|---|
committer | Luck <git@lucko.me> | 2019-04-17 10:06:47 +0100 |
commit | 88857e015d3be6f894592204d76d8580eae0ac9b (patch) | |
tree | 60b87660120586542877bc4343a84f571ee2aae1 /spark-bukkit/src/main | |
parent | e7b1797731508202c62dfa5bdc1c4d779f5cbfd1 (diff) | |
download | spark-88857e015d3be6f894592204d76d8580eae0ac9b.tar.gz spark-88857e015d3be6f894592204d76d8580eae0ac9b.tar.bz2 spark-88857e015d3be6f894592204d76d8580eae0ac9b.zip |
Fix permission checking
Diffstat (limited to 'spark-bukkit/src/main')
-rw-r--r-- | spark-bukkit/src/main/java/me/lucko/spark/bukkit/SparkBukkitPlugin.java | 3 |
1 files changed, 2 insertions, 1 deletions
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<Command } @Override - public Set<CommandSender> getSenders() { + public Set<CommandSender> getSendersWithPermission(String permission) { Set<CommandSender> senders = new HashSet<>(getServer().getOnlinePlayers()); + senders.removeIf(sender -> !sender.hasPermission(permission)); senders.add(getServer().getConsoleSender()); return senders; } |