From 27ba4ff800a2507ebc1ff12ea38b454d835ab8b0 Mon Sep 17 00:00:00 2001 From: GJ Date: Fri, 15 Feb 2013 13:15:13 -0500 Subject: [PATCH] Make /xplock work for localized skill names. --- .../com/gmail/nossr50/spout/commands/XplockCommand.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/spout/commands/XplockCommand.java b/src/main/java/com/gmail/nossr50/spout/commands/XplockCommand.java index 8293be710..edb4a51bd 100644 --- a/src/main/java/com/gmail/nossr50/spout/commands/XplockCommand.java +++ b/src/main/java/com/gmail/nossr50/spout/commands/XplockCommand.java @@ -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; }