diff options
Diffstat (limited to 'spark-forge1122')
3 files changed, 4 insertions, 4 deletions
diff --git a/spark-forge1122/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java b/spark-forge1122/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java index 2e64df8..05ff84c 100644 --- a/spark-forge1122/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java +++ b/spark-forge1122/src/main/java/me/lucko/spark/forge/plugin/ForgeClientSparkPlugin.java @@ -63,7 +63,7 @@ public class ForgeClientSparkPlugin extends ForgeSparkPlugin { } @Override - public Stream<ForgeCommandSender> getSendersWithPermission(String permission) { + public Stream<ForgeCommandSender> getCommandSenders() { return Stream.of(new ForgeCommandSender(this.minecraft.player, this)); } diff --git a/spark-forge1122/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java b/spark-forge1122/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java index a4a8434..18fa93d 100644 --- a/spark-forge1122/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java +++ b/spark-forge1122/src/main/java/me/lucko/spark/forge/plugin/ForgeServerSparkPlugin.java @@ -69,9 +69,9 @@ public class ForgeServerSparkPlugin extends ForgeSparkPlugin { } @Override - public Stream<ForgeCommandSender> getSendersWithPermission(String permission) { + public Stream<ForgeCommandSender> getCommandSenders() { return Stream.concat( - this.server.getPlayerList().getPlayers().stream().filter(player -> hasPermission(player, permission)), + this.server.getPlayerList().getPlayers().stream(), Stream.of(this.server) ).map(sender -> new ForgeCommandSender(sender, this)); } diff --git a/spark-forge1122/src/main/java/me/lucko/spark/forge/plugin/ForgeSparkPlugin.java b/spark-forge1122/src/main/java/me/lucko/spark/forge/plugin/ForgeSparkPlugin.java index 0b641c6..0b02469 100644 --- a/spark-forge1122/src/main/java/me/lucko/spark/forge/plugin/ForgeSparkPlugin.java +++ b/spark-forge1122/src/main/java/me/lucko/spark/forge/plugin/ForgeSparkPlugin.java @@ -117,7 +117,7 @@ public abstract class ForgeSparkPlugin implements SparkPlugin, ICommand { @Override public boolean checkPermission(MinecraftServer minecraftServer, ICommandSender sender) { - return hasPermission(sender, "spark"); + return this.platform.hasPermissionForAnyCommand(new ForgeCommandSender(sender, this)); } @Override |