mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-25 01:58:28 +01:00
Fix localized versions of /skillname not working properly. Fixes #669
This commit is contained in:
parent
776821a988
commit
b1db0d037d
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user