-
Bug
-
Resolution: Fixed
-
1.20.4, 24w03b, 24w04a
-
Confirmed
-
Commands, Text
-
Low
-
Platform
Description of issue
The command with issue is (experience|xp) query <targets> (levels|points) and it affects since 17w45a, includes April Fools' Joke snapshots and many experimental versions.
Steps to reproduce
When executing the command, if you forward any multiple player to the Entity Argument (a.k.a. Target Selector) named "targets", then you can see the message "Only one player is allowed, but the provided selector allows more than one", which keyed "argument.player.toomany". A single player is required, but the argument name is plural, such as targets.
Expected result
It's make sense to rename targets to singular, like target or player because it affects only a player.
Attachments
Attachment 1
Internal Minecraft source code which have the issue in Yarn mapping, 1.20.4.
You can see that "targets" was used with EntityArgumentType.player(), not players(). You can also ignore the red underline.
Attachment 2
In-game screenshot in 17w45a which the issue starts.