Use Locale.ROOT for case folding
String.toLowerCase gives different results depending on the server JVM's default locale (see http://lotusnotus.com/lotusnotus_en.nsf/dx/dotless-i-tolowercase-and-touppercase-functions-use-responsibly.htm), so for example "KICK" wouldn't become "kick" if the server locale was Turkish. Explicitly using English case folding makes the behavior consistent regardless of server locale.
This PR also converts literal to lowercase in the constructor, rather than having to do it again every time listSuggestions is called, and makes the match in parse(StringReader) on line 56 case-insensitive.
Good idea, though if I recall correctly the main Minecraft codebase uses Locale.ROOT instead of Locale.ENGLISH for this purpose.
Yeah, I ran grep over the code to check for other uses of toLowerCase, toUpperCase and equalsIgnoreCase.
I don't think it's ok to convert literal to lowercase in the constructor, because not all literals in Minecraft are lowercased, e.g. literal announceAdvancements in command /gamerule.
@SPGoding Those literals aren't case-sensitive anyway, so the only place where it makes a difference is in the autocomplete.
It's 1.16 update time, @Dinnerbone please reconsider looking into this (given fry is looking into DFU fixes).
This is now superseded by #86
This is now superseded by #86
The only difference seems to be that this pull request also changes it so literals are parsed case-sensitively here, though that might be an undesired behavior change?