mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
add "bukkit.command.xxx.other" permission to all our commands
This commit is contained in:
@@ -37,10 +37,10 @@ index 01ac09bda83703c16aed64133096377d7113693e..27b35e12eafd3ee735fcea201c9d371c
|
||||
public static String serverModName = "Purpur";
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/command/PingCommand.java b/src/main/java/org/purpurmc/purpur/command/PingCommand.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..5e89694a7f01d9b09c7f75745f8faa4c5748c173
|
||||
index 0000000000000000000000000000000000000000..179727c6b3171c040d1aaf069525f61a9a2d54d9
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/purpurmc/purpur/command/PingCommand.java
|
||||
@@ -0,0 +1,32 @@
|
||||
@@ -0,0 +1,33 @@
|
||||
+package org.purpurmc.purpur.command;
|
||||
+
|
||||
+import com.mojang.brigadier.CommandDispatcher;
|
||||
@@ -60,6 +60,7 @@ index 0000000000000000000000000000000000000000..5e89694a7f01d9b09c7f75745f8faa4c
|
||||
+ .requires((listener) -> listener.hasPermission(2, "bukkit.command.ping"))
|
||||
+ .executes((context) -> execute(context.getSource(), Collections.singleton(context.getSource().getPlayerOrException())))
|
||||
+ .then(Commands.argument("targets", EntityArgument.players())
|
||||
+ .requires(listener -> listener.hasPermission(2, "bukkit.command.ping.other"))
|
||||
+ .executes((context) -> execute(context.getSource(), EntityArgument.getPlayers(context, "targets")))
|
||||
+ )
|
||||
+ );
|
||||
|
||||
Reference in New Issue
Block a user