Force all identifiers to lower case

This commit is contained in:
extendedclip 2020-07-31 12:01:27 -04:00
parent 2e28647497
commit 0e733b6933
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ public final class CharsReplacer implements Replacer
@Override
public String apply(@NotNull final String text, @Nullable final OfflinePlayer player, @NotNull final Function<String, @Nullable PlaceholderExpansion> lookup)
{
final char[] chars = text.toLowerCase().toCharArray();
final char[] chars = text.toCharArray();
final StringBuilder builder = new StringBuilder(text.length());
final StringBuilder identifier = new StringBuilder();
@ -144,7 +144,7 @@ public final class CharsReplacer implements Replacer
}
}
final String identifierString = identifier.toString();
final String identifierString = identifier.toString().toLowerCase();
final String parametersString = parameters.toString();
identifier.setLength(0);

View File

@ -87,7 +87,7 @@ public final class ReplacerUnitTester
@Test
void testCharsReplacerHandlesEscapedHex()
{
final String text = "\\&xFFFFFFThis should not change.";
final String text = "\\&xffffffThis should not change.";
assertEquals(text.substring(1), Values.CHARS_REPLACER.apply(text, null, Values.PLACEHOLDERS::get));
}