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();
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;
}
}