From 1abff42884564d85c0895461b7e60aa9dbbd28d0 Mon Sep 17 00:00:00 2001 From: Luck Date: Thu, 11 Mar 2021 13:04:09 +0000 Subject: Fix command broadcast permission checks, other misc tidying --- .../src/main/java/me/lucko/spark/nukkit/NukkitSparkPlugin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spark-nukkit/src/main/java') diff --git a/spark-nukkit/src/main/java/me/lucko/spark/nukkit/NukkitSparkPlugin.java b/spark-nukkit/src/main/java/me/lucko/spark/nukkit/NukkitSparkPlugin.java index dab3be3..2728d36 100644 --- a/spark-nukkit/src/main/java/me/lucko/spark/nukkit/NukkitSparkPlugin.java +++ b/spark-nukkit/src/main/java/me/lucko/spark/nukkit/NukkitSparkPlugin.java @@ -67,9 +67,9 @@ public class NukkitSparkPlugin extends PluginBase implements SparkPlugin { } @Override - public Stream getSendersWithPermission(String permission) { + public Stream getCommandSenders() { return Stream.concat( - getServer().getOnlinePlayers().values().stream().filter(player -> player.hasPermission(permission)), + getServer().getOnlinePlayers().values().stream(), Stream.of(getServer().getConsoleSender()) ).map(NukkitCommandSender::new); } -- cgit