Adding new permissions for the /addxp command.

This commit is contained in:
U-YUE\Sean 2013-01-30 09:09:14 -08:00
parent 64fc7bcaf8
commit 8a852ce22e

View File

@ -22,9 +22,11 @@ public class AddxpCommand implements CommandExecutor {
Player modifiedPlayer; Player modifiedPlayer;
int xp; int xp;
SkillType skill; SkillType skill;
// DEPRECATED PERMISSION
boolean oldPermission = !CommandHelper.noCommandPermissions(sender, "mcmmo.tools.mmoedit");
String usage = LocaleLoader.getString("Commands.Usage.3", new Object[] {"addxp", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]", "<" + LocaleLoader.getString("Commands.Usage.Skill") + ">", "<" + LocaleLoader.getString("Commands.Usage.XP") + ">" }); String usage = LocaleLoader.getString("Commands.Usage.3", new Object[] {"addxp", "[" + LocaleLoader.getString("Commands.Usage.Player") + "]", "<" + LocaleLoader.getString("Commands.Usage.Skill") + ">", "<" + LocaleLoader.getString("Commands.Usage.XP") + ">" });
if (CommandHelper.noCommandPermissions(sender, "mcmmo.tools.mmoedit")) { if (!oldPermission && CommandHelper.noCommandPermissions(sender, "mcmmo.commands.addxp")) {
return true; return true;
} }
@ -70,6 +72,10 @@ public class AddxpCommand implements CommandExecutor {
return true; return true;
case 3: case 3:
if (!oldPermission && CommandHelper.noCommandPermissions(sender, "mcmmo.commands.addxp")) {
return true;
}
modifiedPlayer = mcMMO.p.getServer().getPlayer(args[0]); modifiedPlayer = mcMMO.p.getServer().getPlayer(args[0]);
String playerName = modifiedPlayer.getName(); String playerName = modifiedPlayer.getName();
McMMOPlayer mcMMOPlayer = Users.getPlayer(modifiedPlayer); McMMOPlayer mcMMOPlayer = Users.getPlayer(modifiedPlayer);