diff --git a/Essentials/src/main/java/com/earth2me/essentials/textreader/KeywordReplacer.java b/Essentials/src/main/java/com/earth2me/essentials/textreader/KeywordReplacer.java index 699933808ff..e658a256a27 100644 --- a/Essentials/src/main/java/com/earth2me/essentials/textreader/KeywordReplacer.java +++ b/Essentials/src/main/java/com/earth2me/essentials/textreader/KeywordReplacer.java @@ -142,7 +142,7 @@ private void replaceKeywords(final CommandSource sender) { String line = input.getLines().get(i); // Skip processing b64 encoded items, they will not have keywords in them. - if (line.charAt(0) == '@') { + if (line.startsWith("@")) { replaced.add(line); continue; } @@ -383,7 +383,7 @@ private String replaceLine(String line, final String fullMatch, final String[] m if (this.replaceSpacesWithUnderscores) { // Don't replace spaces with underscores in command nor escape underscores. - if (line.charAt(0) != '/') { + if (line.startsWith("/")) { replacer = replacer.replace("_", "\\_").replaceAll("\\s", "_"); } }