From 64fc7bcaf88dddc9844989e06e7c969645e21a5b Mon Sep 17 00:00:00 2001 From: "U-YUE\\Sean" Date: Wed, 30 Jan 2013 09:06:21 -0800 Subject: [PATCH] Updating permissions for the /addlevels command. --- .../gmail/nossr50/commands/general/AddlevelsCommand.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/commands/general/AddlevelsCommand.java b/src/main/java/com/gmail/nossr50/commands/general/AddlevelsCommand.java index 4233ba953..68242075a 100644 --- a/src/main/java/com/gmail/nossr50/commands/general/AddlevelsCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/general/AddlevelsCommand.java @@ -22,9 +22,11 @@ public class AddlevelsCommand implements CommandExecutor{ PlayerProfile profile; int levels; SkillType skill; + // DEPRECATED PERMISSION + boolean oldPermission = !CommandHelper.noCommandPermissions(sender, "mcmmo.tools.mmoedit"); String usage = LocaleLoader.getString("Commands.Usage.3", new Object[] {"addlevels", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]", "<" + LocaleLoader.getString("Commands.Usage.Skill") + ">", "<" + LocaleLoader.getString("Commands.Usage.Level") + ">" }); - if (CommandHelper.noCommandPermissions(sender, "mcmmo.tools.mmoedit")) { + if (!oldPermission && CommandHelper.noCommandPermissions(sender, "mcmmo.commands.addlevels")) { return true; } @@ -59,6 +61,10 @@ public class AddlevelsCommand implements CommandExecutor{ return true; case 3: + if (!oldPermission && CommandHelper.noCommandPermissions(sender, "mcmmo.commands.addlevels.others")) { + return true; + } + modifiedPlayer = mcMMO.p.getServer().getOfflinePlayer(args[0]); String playerName = modifiedPlayer.getName(); profile = Users.getProfile(modifiedPlayer);