mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-24 17:47:44 +01:00
Updating permissions for the /addlevels command.
This commit is contained in:
parent
852872f55c
commit
64fc7bcaf8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user