mojira.dev
MC-268045

The name of Entity Argument is plural in Query literal node of Experience command

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 target{+}s{+}.

Expected result

It's make sense to rename targets to singular, like target or player because it affects only a player.

Attachments

Attachment 1

[media]

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

[media]

In-game screenshot in 17w45a which the issue starts.

 

Attachments

Comments 1

Can confirm in 24w04a. This behavior is irregular when compared to other commands which require a single target, such as '/data get entity ...'

[media]

Note:
Using @a[limit=1] can circumvent the warning.

NoEul

slicedlime

Confirmed

Platform

Low

Commands, Text

command, command-feedback, experience, grammar, grammar-issue, pluralization, xp

1.20.4, 24w03b, 24w04a

24w33a

Retrieved