mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-19 08:55:26 +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;
|
||||
int xp;
|
||||
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") + ">" });
|
||||
|
||||
if (CommandHelper.noCommandPermissions(sender, "mcmmo.tools.mmoedit")) {
|
||||
if (!oldPermission && CommandHelper.noCommandPermissions(sender, "mcmmo.commands.addxp")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -70,6 +72,10 @@ public class AddxpCommand implements CommandExecutor {
|
||||
return true;
|
||||
|
||||
case 3:
|
||||
if (!oldPermission && CommandHelper.noCommandPermissions(sender, "mcmmo.commands.addxp")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
modifiedPlayer = mcMMO.p.getServer().getPlayer(args[0]);
|
||||
String playerName = modifiedPlayer.getName();
|
||||
McMMOPlayer mcMMOPlayer = Users.getPlayer(modifiedPlayer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user