Affects Version/s: Minecraft 17w45a, Minecraft 17w45b, Minecraft 17w46a, Minecraft 17w47b, Minecraft 18w01a, Minecraft 18w11a, Minecraft 18w19b, Minecraft 1.13-pre1, Minecraft 1.13-pre5, Minecraft 1.13-pre6, Minecraft 1.13, Minecraft 18w30a, Minecraft 18w30b, Minecraft 18w32a, Minecraft 1.13.1, 1.15.1, 1.15.2 Pre-release 2
Fix Version/s: None
Many command arguments now only allow the same characters as unquoted NBT strings (a-zA-Z0-9._+-). For example,
is now an error.
Some commands allow you to put double quotes around the argument to fix this. For example,
attempts to clear all items from the player A"A.
Other commands do not; that scoreboard command, for example, is unfixable.
Still others have no issue with special characters, treating them just like any other character.
This behavior is very inconsistent:
bans the player "A\"A", but
throws a parsing error.
I have identified three main ways that commands handle special characters:
- Broken: If the argument contains any characters that would not be allowed in an unquoted NBT string (allowed: a-zA-Z0-9._+-) parsing fails, usually with an error about trailing data before the invalid character.
- Quotable: If the argument starts with ", it is parsed as a quoted string. Otherwise, it behaves like a Broken argument.
- Ignored: All characters are allowed (with the possible exception of spaces ending the argument), and none are parsed specially.
These are used with no consistent pattern; player names, for example, are treated in all three ways by different commands.
Arguments that actually want to restrict their valid characters should display a clearer error message than "found trailing data". Additionally, the ability or lack of ability to quote arguments should be consistent between commands. I personally think that player names, objective names, team names, and tag names should always be quotable, mainly for the ability to use spaces in them.