mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +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;
|
PlayerProfile profile;
|
||||||
int levels;
|
int levels;
|
||||||
SkillType skill;
|
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") + ">" });
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,6 +61,10 @@ public class AddlevelsCommand implements CommandExecutor{
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
|
if (!oldPermission && CommandHelper.noCommandPermissions(sender, "mcmmo.commands.addlevels.others")) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
modifiedPlayer = mcMMO.p.getServer().getOfflinePlayer(args[0]);
|
modifiedPlayer = mcMMO.p.getServer().getOfflinePlayer(args[0]);
|
||||||
String playerName = modifiedPlayer.getName();
|
String playerName = modifiedPlayer.getName();
|
||||||
profile = Users.getProfile(modifiedPlayer);
|
profile = Users.getProfile(modifiedPlayer);
|
||||||
|
Loading…
Reference in New Issue
Block a user