aboutsummaryrefslogtreecommitdiff
path: root/spark-sponge/src/main
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2019-04-17 10:06:47 +0100
committerLuck <git@lucko.me>2019-04-17 10:06:47 +0100
commit88857e015d3be6f894592204d76d8580eae0ac9b (patch)
tree60b87660120586542877bc4343a84f571ee2aae1 /spark-sponge/src/main
parente7b1797731508202c62dfa5bdc1c4d779f5cbfd1 (diff)
downloadspark-88857e015d3be6f894592204d76d8580eae0ac9b.tar.gz
spark-88857e015d3be6f894592204d76d8580eae0ac9b.tar.bz2
spark-88857e015d3be6f894592204d76d8580eae0ac9b.zip
Fix permission checking
Diffstat (limited to 'spark-sponge/src/main')
-rw-r--r--spark-sponge/src/main/java/me/lucko/spark/sponge/SparkSpongePlugin.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/spark-sponge/src/main/java/me/lucko/spark/sponge/SparkSpongePlugin.java b/spark-sponge/src/main/java/me/lucko/spark/sponge/SparkSpongePlugin.java
index 6d0c56a..159cbc7 100644
--- a/spark-sponge/src/main/java/me/lucko/spark/sponge/SparkSpongePlugin.java
+++ b/spark-sponge/src/main/java/me/lucko/spark/sponge/SparkSpongePlugin.java
@@ -107,8 +107,9 @@ public class SparkSpongePlugin implements SparkPlugin<CommandSource> {
}
@Override
- public Set<CommandSource> getSenders() {
+ public Set<CommandSource> getSendersWithPermission(String permission) {
Set<CommandSource> senders = new HashSet<>(this.game.getServer().getOnlinePlayers());
+ senders.removeIf(sender -> !sender.hasPermission(permission));
senders.add(this.game.getServer().getConsole());
return senders;
}