Make /xplock work for localized skill names.

This commit is contained in:
GJ 2013-02-15 13:15:13 -05:00
parent c80bb45cad
commit 27ba4ff800

View File

@ -37,12 +37,14 @@ public class XplockCommand extends SpoutCommand {
return true;
}
if (!sender.hasPermission("mcmmo.commands.xplock." + args[0].toLowerCase())) {
SkillType skill = SkillType.getSkill(args[0]);
if (!sender.hasPermission("mcmmo.commands.xplock." + SkillTools.getSkillName(skill).toLowerCase())) {
sender.sendMessage(command.getPermissionMessage());
return true;
}
lockXpBar(sender, SkillType.getSkill(args[0]));
lockXpBar(sender, skill);
return true;
}