From 88857e015d3be6f894592204d76d8580eae0ac9b Mon Sep 17 00:00:00 2001 From: Luck Date: Wed, 17 Apr 2019 10:06:47 +0100 Subject: Fix permission checking --- spark-common/src/main/java/me/lucko/spark/common/SparkPlugin.java | 2 +- .../main/java/me/lucko/spark/common/command/CommandResponseHandler.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'spark-common/src') diff --git a/spark-common/src/main/java/me/lucko/spark/common/SparkPlugin.java b/spark-common/src/main/java/me/lucko/spark/common/SparkPlugin.java index 7a3a353..481a615 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/SparkPlugin.java +++ b/spark-common/src/main/java/me/lucko/spark/common/SparkPlugin.java @@ -34,7 +34,7 @@ public interface SparkPlugin { String getLabel(); - Set getSenders(); + Set getSendersWithPermission(String permission); void sendMessage(S sender, String message); diff --git a/spark-common/src/main/java/me/lucko/spark/common/command/CommandResponseHandler.java b/spark-common/src/main/java/me/lucko/spark/common/command/CommandResponseHandler.java index 0df2950..9d604bd 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/command/CommandResponseHandler.java +++ b/spark-common/src/main/java/me/lucko/spark/common/command/CommandResponseHandler.java @@ -43,7 +43,7 @@ public class CommandResponseHandler { } public void allSenders(Consumer action) { - Set senders = this.platform.getPlugin().getSenders(); + Set senders = this.platform.getPlugin().getSendersWithPermission("spark"); senders.add(this.sender); senders.forEach(action); } -- cgit