aboutsummaryrefslogtreecommitdiff
path: root/spark-bungeecord/src/main/java/me
diff options
context:
space:
mode:
Diffstat (limited to 'spark-bungeecord/src/main/java/me')
-rw-r--r--spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java b/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java
index 5c39d34..0bc118a 100644
--- a/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java
+++ b/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java
@@ -68,8 +68,9 @@ public class SparkBungeeCordPlugin extends Plugin implements SparkPlugin<Command
}
@Override
- public Set<CommandSender> getSenders() {
+ public Set<CommandSender> getSendersWithPermission(String permission) {
Set<CommandSender> senders = new HashSet<>(getProxy().getPlayers());
+ senders.removeIf(sender -> !sender.hasPermission(permission));
senders.add(getProxy().getConsole());
return senders;
}