mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-02 00:30:07 +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();
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user