diff options
author | KHobbits <rob@khobbits.co.uk> | 2013-09-06 23:54:37 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-09-06 23:54:37 +0100 |
commit | e01622d6e895688f23a61114c0eff8fad7b77f1e (patch) | |
tree | 8f1fd036fecc8841981dbd459a33b3c44586a3c1 | |
parent | 4146c401f06fc39e1e6e75710500765cbb583e07 (diff) | |
download | Essentials-e01622d6e895688f23a61114c0eff8fad7b77f1e.tar Essentials-e01622d6e895688f23a61114c0eff8fad7b77f1e.tar.gz Essentials-e01622d6e895688f23a61114c0eff8fad7b77f1e.tar.lz Essentials-e01622d6e895688f23a61114c0eff8fad7b77f1e.tar.xz Essentials-e01622d6e895688f23a61114c0eff8fad7b77f1e.zip |
Fix case sensitivity on {PLAYERLIST:group}
-rw-r--r-- | Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java index 3ccc6e929..30660a971 100644 --- a/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java +++ b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java @@ -24,6 +24,7 @@ import static com.earth2me.essentials.textreader.KeywordType.DISPLAYNAME; import static com.earth2me.essentials.textreader.KeywordType.PLAYER; import java.util.EnumMap; import java.util.HashMap; +import java.util.Locale; import java.util.logging.Level; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -110,7 +111,7 @@ public class KeywordReplacer implements IText String subKeyword = ""; if (matchTokens.length > 1) { - subKeyword = matchTokens[1]; + subKeyword = matchTokens[1].toLowerCase(Locale.ENGLISH); } if (keywordCache.containsKey(validKeyword)) @@ -241,9 +242,9 @@ public class KeywordReplacer implements IText { replacer = outputList.get(""); } - else if (outputList.containsKey(matchTokens[1])) + else if (outputList.containsKey(matchTokens[1].toLowerCase(Locale.ENGLISH))) { - replacer = outputList.get(matchTokens[1]); + replacer = outputList.get(matchTokens[1].toLowerCase(Locale.ENGLISH)); } else if (matchTokens.length > 2) { |