From b1db0d037d8d547afd7777f89604dfc398d73a3d Mon Sep 17 00:00:00 2001 From: GJ Date: Wed, 13 Feb 2013 10:32:25 -0500 Subject: [PATCH] Fix localized versions of /skillname not working properly. Fixes #669 --- .../java/com/gmail/nossr50/listeners/PlayerListener.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index 90931c866..942c5ded3 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -372,15 +372,15 @@ public class PlayerListener implements Listener { String lowerCaseCommand = command.toLowerCase(); for (SkillType skill : SkillType.values()) { - String commandName = skill.toString().toLowerCase(); - String localizedName = LocaleLoader.getString(Misc.getCapitalized(commandName) + ".SkillName").toLowerCase(); + String skillName = skill.toString().toLowerCase(); + String localizedName = LocaleLoader.getString(Misc.getCapitalized(skillName) + ".SkillName").toLowerCase(); if (lowerCaseCommand.equals(localizedName)) { + event.setMessage(message.replace(command, skillName)); break; } - if (lowerCaseCommand.equals(commandName)) { - event.setMessage(message.replace(command, localizedName)); + if (lowerCaseCommand.equals(skillName)) { break; } }