fix some more issues
This commit is contained in:
parent
cc81668863
commit
44e68c301a
114 changed files with 183 additions and 125 deletions
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add missing default perms for commands
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java b/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java
|
||||
index a9ea2e38e4673686c9994a58c94ad19e59fd423c..dd95b3bfe59f2bb635afe92317288efcd2986326 100644
|
||||
index a9ea2e38e4673686c9994a58c94ad19e59fd423c..52649f82351ab4f675c3cc3cd6640956b0f76b91 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java
|
||||
@@ -24,13 +24,74 @@ public final class CommandPermissions {
|
||||
@@ -24,13 +24,75 @@ public final class CommandPermissions {
|
||||
DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "stop", "Allows the user to stop the server", PermissionDefault.OP, commands);
|
||||
DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "list", "Allows the user to list all online players", PermissionDefault.OP, commands);
|
||||
DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "gamemode", "Allows the user to change the gamemode of another player", PermissionDefault.OP, commands);
|
||||
|
@ -75,6 +75,7 @@ index a9ea2e38e4673686c9994a58c94ad19e59fd423c..dd95b3bfe59f2bb635afe92317288efc
|
|||
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "time", "Allows the user to change or query the world's game time", PermissionDefault.OP, commands);
|
||||
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "tick", "Allows the user to control the tick rate of the server", PermissionDefault.OP, commands);
|
||||
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "title", "Allows the user to manage screen titles", PermissionDefault.OP, commands);
|
||||
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "transfer", "Allows the user to transfer to another server", PermissionDefault.OP, commands);
|
||||
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "weather", "Allows the user to set the weather", PermissionDefault.OP, commands);
|
||||
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "whitelist", "Allows the user to manage the server whitelist", PermissionDefault.OP, commands);
|
||||
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "worldborder", "Allows the user to manage the world border", PermissionDefault.OP, commands);
|
||||
|
@ -87,7 +88,7 @@ index a9ea2e38e4673686c9994a58c94ad19e59fd423c..dd95b3bfe59f2bb635afe92317288efc
|
|||
|
||||
diff --git a/src/test/java/io/papermc/paper/permissions/MinecraftCommandPermissionsTest.java b/src/test/java/io/papermc/paper/permissions/MinecraftCommandPermissionsTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..afeb4271fffb7546209f1e651214065187c88302
|
||||
index 0000000000000000000000000000000000000000..ca71c688b37ce2c8b712a4f9216cf872c8edf78e
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/permissions/MinecraftCommandPermissionsTest.java
|
||||
@@ -0,0 +1,82 @@
|
||||
|
@ -132,7 +133,7 @@ index 0000000000000000000000000000000000000000..afeb4271fffb7546209f1e6512140651
|
|||
+ CraftDefaultPermissions.registerCorePermissions();
|
||||
+ Set<String> perms = collectMinecraftCommandPerms();
|
||||
+
|
||||
+ Commands commands = new Commands(Commands.CommandSelection.DEDICATED, CommandBuildContext.configurable(AbstractTestingBase.REGISTRY_CUSTOM, FeatureFlags.VANILLA_SET));
|
||||
+ Commands commands = new Commands(Commands.CommandSelection.DEDICATED, CommandBuildContext.simple(AbstractTestingBase.REGISTRY_CUSTOM, FeatureFlags.VANILLA_SET));
|
||||
+ RootCommandNode<CommandSourceStack> root = commands.getDispatcher().getRoot();
|
||||
+ Set<String> missing = new LinkedHashSet<>();
|
||||
+ Set<String> foundPerms = new HashSet<>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue