aboutsummaryrefslogtreecommitdiff
path: root/spark-sponge/src/main/java/me/lucko/spark/sponge
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2021-03-11 13:04:09 +0000
committerLuck <git@lucko.me>2021-03-11 13:04:09 +0000
commit1abff42884564d85c0895461b7e60aa9dbbd28d0 (patch)
treed9d6ce721b33214b1abff4425984ccee8b690607 /spark-sponge/src/main/java/me/lucko/spark/sponge
parent4e765fe0c4b746c3527e670ce9ebaaf553bd8479 (diff)
downloadspark-1abff42884564d85c0895461b7e60aa9dbbd28d0.tar.gz
spark-1abff42884564d85c0895461b7e60aa9dbbd28d0.tar.bz2
spark-1abff42884564d85c0895461b7e60aa9dbbd28d0.zip
Fix command broadcast permission checks, other misc tidying
Diffstat (limited to 'spark-sponge/src/main/java/me/lucko/spark/sponge')
-rw-r--r--spark-sponge/src/main/java/me/lucko/spark/sponge/SpongeSparkPlugin.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/spark-sponge/src/main/java/me/lucko/spark/sponge/SpongeSparkPlugin.java b/spark-sponge/src/main/java/me/lucko/spark/sponge/SpongeSparkPlugin.java
index 055f1f4..38af806 100644
--- a/spark-sponge/src/main/java/me/lucko/spark/sponge/SpongeSparkPlugin.java
+++ b/spark-sponge/src/main/java/me/lucko/spark/sponge/SpongeSparkPlugin.java
@@ -109,9 +109,9 @@ public class SpongeSparkPlugin implements SparkPlugin {
}
@Override
- public Stream<SpongeCommandSender> getSendersWithPermission(String permission) {
+ public Stream<SpongeCommandSender> getCommandSenders() {
return Stream.concat(
- this.game.getServer().getOnlinePlayers().stream().filter(player -> player.hasPermission(permission)),
+ this.game.getServer().getOnlinePlayers().stream(),
Stream.of(this.game.getServer().getConsole())
).map(source -> new SpongeCommandSender(source, this.audienceFactory));
}
@@ -156,7 +156,7 @@ public class SpongeSparkPlugin implements SparkPlugin {
@Override
public boolean testPermission(CommandSource source) {
- return source.hasPermission("spark");
+ return this.plugin.platform.hasPermissionForAnyCommand(new SpongeCommandSender(source, this.plugin.audienceFactory));
}
@Override