aboutsummaryrefslogtreecommitdiff
path: root/spark-fabric/src/main
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-fabric/src/main
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-fabric/src/main')
-rw-r--r--spark-fabric/src/main/java/me/lucko/spark/fabric/plugin/FabricClientSparkPlugin.java2
-rw-r--r--spark-fabric/src/main/java/me/lucko/spark/fabric/plugin/FabricServerSparkPlugin.java5
2 files changed, 3 insertions, 4 deletions
diff --git a/spark-fabric/src/main/java/me/lucko/spark/fabric/plugin/FabricClientSparkPlugin.java b/spark-fabric/src/main/java/me/lucko/spark/fabric/plugin/FabricClientSparkPlugin.java
index 1bc6707..ae8f3e0 100644
--- a/spark-fabric/src/main/java/me/lucko/spark/fabric/plugin/FabricClientSparkPlugin.java
+++ b/spark-fabric/src/main/java/me/lucko/spark/fabric/plugin/FabricClientSparkPlugin.java
@@ -139,7 +139,7 @@ public class FabricClientSparkPlugin extends FabricSparkPlugin implements Sugges
}
@Override
- public Stream<FabricCommandSender> getSendersWithPermission(String permission) {
+ public Stream<FabricCommandSender> getCommandSenders() {
return Stream.of(new FabricCommandSender(this.minecraft.player, this));
}
diff --git a/spark-fabric/src/main/java/me/lucko/spark/fabric/plugin/FabricServerSparkPlugin.java b/spark-fabric/src/main/java/me/lucko/spark/fabric/plugin/FabricServerSparkPlugin.java
index 08edc82..9244b57 100644
--- a/spark-fabric/src/main/java/me/lucko/spark/fabric/plugin/FabricServerSparkPlugin.java
+++ b/spark-fabric/src/main/java/me/lucko/spark/fabric/plugin/FabricServerSparkPlugin.java
@@ -120,10 +120,9 @@ public class FabricServerSparkPlugin extends FabricSparkPlugin implements Comman
}
@Override
- public Stream<FabricCommandSender> getSendersWithPermission(String permission) {
+ public Stream<FabricCommandSender> getCommandSenders() {
return Stream.concat(
- this.server.getPlayerManager().getPlayerList().stream()
- .filter(player -> hasPermission(player, permission)),
+ this.server.getPlayerManager().getPlayerList().stream(),
Stream.of(this.server)
).map(sender -> new FabricCommandSender(sender, this));
}