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
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.
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"
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).
Please provide the exact command you've used.