diff --git a/src/main/java/com/gmail/nossr50/util/Permissions.java b/src/main/java/com/gmail/nossr50/util/Permissions.java index c405f84ab..4cfe85c43 100644 --- a/src/main/java/com/gmail/nossr50/util/Permissions.java +++ b/src/main/java/com/gmail/nossr50/util/Permissions.java @@ -44,6 +44,7 @@ public final class Permissions { */ 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 addlevelsOthers(Permissible permissible) { return permissible.hasPermission("mcmmo.commands.addlevels.others"); } diff --git a/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java b/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java index 83d305486..6510604e9 100644 --- a/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java +++ b/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java @@ -160,7 +160,7 @@ public final class CommandRegistrationManager { private static void registerMmoDebugCommand() { PluginCommand command = mcMMO.p.getCommand("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.setUsage(LocaleLoader.getString("Commands.Usage.0", "mmodebug")); command.setExecutor(new PlayerDebugCommand()); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index fec5c78c2..69cb8b10b 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -30,6 +30,7 @@ commands: mmodebug: aliases: [mcmmodebugmode] description: Toggles a debug mode which will print useful information to chat + permission: mcmmo.commands.mmodebug mmoinfo: aliases: [mcinfo] description: Info pages for mcMMO