Fix localized versions of /skillname not working properly. Fixes #669

This commit is contained in:
GJ 2013-02-13 10:32:25 -05:00
parent 776821a988
commit b1db0d037d

View File

@ -372,15 +372,15 @@ public class PlayerListener implements Listener {
String lowerCaseCommand = command.toLowerCase(); String lowerCaseCommand = command.toLowerCase();
for (SkillType skill : SkillType.values()) { for (SkillType skill : SkillType.values()) {
String commandName = skill.toString().toLowerCase(); String skillName = skill.toString().toLowerCase();
String localizedName = LocaleLoader.getString(Misc.getCapitalized(commandName) + ".SkillName").toLowerCase(); String localizedName = LocaleLoader.getString(Misc.getCapitalized(skillName) + ".SkillName").toLowerCase();
if (lowerCaseCommand.equals(localizedName)) { if (lowerCaseCommand.equals(localizedName)) {
event.setMessage(message.replace(command, skillName));
break; break;
} }
if (lowerCaseCommand.equals(commandName)) { if (lowerCaseCommand.equals(skillName)) {
event.setMessage(message.replace(command, localizedName));
break; break;
} }
} }