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