mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
add "bukkit.command.xxx.other" permission to all our commands
This commit is contained in:
@@ -38,10 +38,10 @@ index 27b35e12eafd3ee735fcea201c9d371c2480e4da..fdcffdc618fcbc2413f6e6949d82ed1f
|
||||
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/command/DemoCommand.java b/src/main/java/org/purpurmc/purpur/command/DemoCommand.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..cb76bb1345738084e4f5797229fd04bd65e8e0f6
|
||||
index 0000000000000000000000000000000000000000..235f3cd89f675b70a6152a00534608c0902f19fd
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/purpurmc/purpur/command/DemoCommand.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..cb76bb1345738084e4f5797229fd04bd
|
||||
+ .requires((listener) -> listener.hasPermission(2, "bukkit.command.demo"))
|
||||
+ .executes((context) -> execute(context.getSource(), Collections.singleton(context.getSource().getPlayerOrException())))
|
||||
+ .then(Commands.argument("targets", EntityArgument.players())
|
||||
+ .requires(listener -> listener.hasPermission(2, "bukkit.command.demo.other"))
|
||||
+ .executes((context) -> execute(context.getSource(), EntityArgument.getPlayers(context, "targets")))
|
||||
+ )
|
||||
+ );
|
||||
|
||||
Reference in New Issue
Block a user