mojira.dev
MC-55493

JSON text selectors have always predefined clickEvent and hoverEvent

The bug

When you use a selector:@p in a /tellraw command and then execute it, it will ignore hoverEvent and clickEvent, instead it will show your UUID and when you click it, it suggests the /msg command. This limits the use of the /tellraw command in combination with selectors drastically.

How to reproduce

/tellraw @p {"selector":"@p","hoverEvent":{"action":"show_text","value":"Test"},"clickEvent":{"action":"run_command","value":"/say Test"}}

Maybe the suggested /msg Player is useful, so I would rather recommend, that when something other is given than the "selector:@p" for example a different clickEvent only then it should use the different clickEvent.

Note: This behaviour is consistent for all game elements that support JSON-text. So also signs and books get the suggest_command action which does not work for them.

Linked issues

Comments 7

Please provide the exact command you've used.

Is this still an issue in the most recent versions (currently that is 1.10.2, or 16w42a) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time.

Confirmed for 1.13.1.

Please, keep the ticket updated.

Confirm 1.15.2

also no known workaround?

so the predefined clickEvent and predefined hoverEvent for selectors really should be overwrite-able.

In 1.15.2 the actual predefined clickEvent is suggest_command "/tell selector"

Present in 1.16.2-pre1.

1.16.2-pre1 as affected version does not seem to be accurate. This bug was already fixed in 1.16 Pre-release 3, probably due to the fixes of MC-183933 and MC-184900, making the hover event work again. Also, the click event immediately runs the command since that version now (before, in 1.16-pre2 it wrote "/tell [playername]" into the chat input line, regardless of the actual click event).

marcono1234

(Unassigned)

Confirmed

Platform

Low

Commands

/tellraw, json, selector

Minecraft 14w20b, Minecraft 14w28b, Minecraft 14w29b, Minecraft 14w30c, Minecraft 14w31a, ..., Minecraft 1.12.2 Pre-Release 1, Minecraft 1.12.2 Pre-Release 2, Minecraft 1.13.1, 1.15.2, 1.16.2 Pre-release 1

1.16 Pre-release 3

Retrieved