diff options
author | Luck <git@lucko.me> | 2019-04-17 10:06:47 +0100 |
---|---|---|
committer | Luck <git@lucko.me> | 2019-04-17 10:06:47 +0100 |
commit | 88857e015d3be6f894592204d76d8580eae0ac9b (patch) | |
tree | 60b87660120586542877bc4343a84f571ee2aae1 /spark-common/src | |
parent | e7b1797731508202c62dfa5bdc1c4d779f5cbfd1 (diff) | |
download | spark-88857e015d3be6f894592204d76d8580eae0ac9b.tar.gz spark-88857e015d3be6f894592204d76d8580eae0ac9b.tar.bz2 spark-88857e015d3be6f894592204d76d8580eae0ac9b.zip |
Fix permission checking
Diffstat (limited to 'spark-common/src')
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/common/SparkPlugin.java | 2 | ||||
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/common/command/CommandResponseHandler.java | 2 |
2 files changed, 2 insertions, 2 deletions
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<S> { String getLabel(); - Set<S> getSenders(); + Set<S> 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<S> { } public void allSenders(Consumer<? super S> action) { - Set<S> senders = this.platform.getPlugin().getSenders(); + Set<S> senders = this.platform.getPlugin().getSendersWithPermission("spark"); senders.add(this.sender); senders.forEach(action); } |