diff options
author | Luck <git@lucko.me> | 2021-03-11 13:04:09 +0000 |
---|---|---|
committer | Luck <git@lucko.me> | 2021-03-11 13:04:09 +0000 |
commit | 1abff42884564d85c0895461b7e60aa9dbbd28d0 (patch) | |
tree | d9d6ce721b33214b1abff4425984ccee8b690607 /spark-forge/src/main/java/me/lucko/spark | |
parent | 4e765fe0c4b746c3527e670ce9ebaaf553bd8479 (diff) | |
download | spark-1abff42884564d85c0895461b7e60aa9dbbd28d0.tar.gz spark-1abff42884564d85c0895461b7e60aa9dbbd28d0.tar.bz2 spark-1abff42884564d85c0895461b7e60aa9dbbd28d0.zip |
Fix command broadcast permission checks, other misc tidying
Diffstat (limited to 'spark-forge/src/main/java/me/lucko/spark')
-rw-r--r-- | spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java | 2 | ||||
-rw-r--r-- | spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java index 1903c69..a47b170 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java @@ -138,7 +138,7 @@ public class ForgeClientSparkPlugin extends ForgeSparkPlugin implements Suggesti } @Override - public Stream<ForgeCommandSender> getSendersWithPermission(String permission) { + public Stream<ForgeCommandSender> getCommandSenders() { return Stream.of(new ForgeCommandSender(this.minecraft.player, this)); } diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java index b4c28b2..4d49b21 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java @@ -127,9 +127,9 @@ public class ForgeServerSparkPlugin extends ForgeSparkPlugin implements Command< } @Override - public Stream<ForgeCommandSender> getSendersWithPermission(String permission) { + public Stream<ForgeCommandSender> getCommandSenders() { return Stream.concat( - this.server.get().getPlayerList().getPlayers().stream().filter(player -> hasPermission(player, permission)), + this.server.get().getPlayerList().getPlayers().stream(), Stream.of(this.server.get()) ).map(sender -> new ForgeCommandSender(sender, this)); } |