From 88857e015d3be6f894592204d76d8580eae0ac9b Mon Sep 17 00:00:00 2001 From: Luck Date: Wed, 17 Apr 2019 10:06:47 +0100 Subject: Fix permission checking --- .../src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'spark-velocity/src/main/java/me/lucko/spark') diff --git a/spark-velocity/src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java b/spark-velocity/src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java index fef48e7..749319d 100644 --- a/spark-velocity/src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java +++ b/spark-velocity/src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java @@ -103,8 +103,9 @@ public class SparkVelocityPlugin implements SparkPlugin, Command } @Override - public Set getSenders() { + public Set getSendersWithPermission(String permission) { Set senders = new HashSet<>(this.proxy.getAllPlayers()); + senders.removeIf(sender -> !sender.hasPermission(permission)); senders.add(this.proxy.getConsoleCommandSource()); return senders; } -- cgit