mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-30 03:21:20 +01:00
Adding new permissions for the /addxp command.
This commit is contained in:
parent
64fc7bcaf8
commit
8a852ce22e
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user