added debug command permission

This commit is contained in:
BuildTools 2023-07-02 02:01:31 +10:00
parent 78596dc00e
commit 2d2d12a549
3 changed files with 3 additions and 1 deletions

View File

@ -44,6 +44,7 @@ public final class Permissions {
*/ */
public static boolean mmoinfo(Permissible permissible) { return permissible.hasPermission("mcmmo.commands.mmoinfo"); } public static boolean mmoinfo(Permissible permissible) { return permissible.hasPermission("mcmmo.commands.mmoinfo"); }
public static boolean mmodebug(Permissible permissible) { return permissible.hasPermission("mcmmo.commands.mmodebug"); }
public static boolean addlevels(Permissible permissible) { return permissible.hasPermission("mcmmo.commands.addlevels"); } public static boolean addlevels(Permissible permissible) { return permissible.hasPermission("mcmmo.commands.addlevels"); }
public static boolean addlevelsOthers(Permissible permissible) { return permissible.hasPermission("mcmmo.commands.addlevels.others"); } public static boolean addlevelsOthers(Permissible permissible) { return permissible.hasPermission("mcmmo.commands.addlevels.others"); }

View File

@ -160,7 +160,7 @@ public final class CommandRegistrationManager {
private static void registerMmoDebugCommand() { private static void registerMmoDebugCommand() {
PluginCommand command = mcMMO.p.getCommand("mmodebug"); PluginCommand command = mcMMO.p.getCommand("mmodebug");
command.setDescription(LocaleLoader.getString("Commands.Description.mmodebug")); command.setDescription(LocaleLoader.getString("Commands.Description.mmodebug"));
command.setPermission(null); //No perm required to save support headaches command.setPermission("mcmmo.commands.mmodebug");
command.setPermissionMessage(permissionsMessage); command.setPermissionMessage(permissionsMessage);
command.setUsage(LocaleLoader.getString("Commands.Usage.0", "mmodebug")); command.setUsage(LocaleLoader.getString("Commands.Usage.0", "mmodebug"));
command.setExecutor(new PlayerDebugCommand()); command.setExecutor(new PlayerDebugCommand());

View File

@ -30,6 +30,7 @@ commands:
mmodebug: mmodebug:
aliases: [mcmmodebugmode] aliases: [mcmmodebugmode]
description: Toggles a debug mode which will print useful information to chat description: Toggles a debug mode which will print useful information to chat
permission: mcmmo.commands.mmodebug
mmoinfo: mmoinfo:
aliases: [mcinfo] aliases: [mcinfo]
description: Info pages for mcMMO description: Info pages for mcMMO