mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
add "bukkit.command.xxx.other" permission to all our commands
This commit is contained in:
@@ -38,10 +38,10 @@ index fdcffdc618fcbc2413f6e6949d82ed1f138086b1..28711abdabec6894faefb3a5bcff503c
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/command/CreditsCommand.java b/src/main/java/org/purpurmc/purpur/command/CreditsCommand.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..8ea09a5154a566b310648ebc32f6840c510a4eba
|
||||
index 0000000000000000000000000000000000000000..40d2fab4a9728ac90c36e30c130f3116b7025d11
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/purpurmc/purpur/command/CreditsCommand.java
|
||||
@@ -0,0 +1,34 @@
|
||||
@@ -0,0 +1,35 @@
|
||||
+package org.purpurmc.purpur.command;
|
||||
+
|
||||
+import com.mojang.brigadier.CommandDispatcher;
|
||||
@@ -61,6 +61,7 @@ index 0000000000000000000000000000000000000000..8ea09a5154a566b310648ebc32f6840c
|
||||
+ .requires((listener) -> listener.hasPermission(2, "bukkit.command.credits"))
|
||||
+ .executes((context) -> execute(context.getSource(), Collections.singleton(context.getSource().getPlayerOrException())))
|
||||
+ .then(Commands.argument("targets", EntityArgument.players())
|
||||
+ .requires(listener -> listener.hasPermission(2, "bukkit.command.credits.other"))
|
||||
+ .executes((context) -> execute(context.getSource(), EntityArgument.getPlayers(context, "targets")))
|
||||
+ )
|
||||
+ );
|
||||
|
||||
Reference in New Issue
Block a user