mojira.dev
MC-56373

Selector and score text components don't work on hoverEvents

The bug

Some tellraw features (like player score and selectors) don't work on hover events

How to reproduce

  1. Initialize score and scoreboard:

    /scoreboard objectives add MC-56373 dummy
    /scoreboard players set @s MC-56373 56373
  1. Run this command:

    /tellraw @s [{"text":"Selector Hover","hoverEvent":{"action":"show_text","value":{"selector":"@s"}}},"\n",{"text":"Score Hover","hoverEvent":{"action":"show_text","value":{"score":{"objective":"MC-56373","name":"@s"}}}}]

    → The first hover event won't show the selector

    → The second hover event won't show the score

Code analysis

Code analysis by @unknown can be found in this comment.

Linked issues

Attachments

Comments 30

Partswise confirmed for 14w21b:

  • 1. Command isn't working

  • 2. Command isn't working with "test" (my name isn't test), BUT also not working with SELECTORS where else this is working:

    /tellraw @a {score:{name:@p,objective:vars}}
  • 3.Command isn't working like you said, but maybe intended

the 2 command, if you instead use a selector, use a name, like Marcono1234 will work

Confirmed for 14w26b. As a shorter example:

/tellraw @a {text:"Hover",hoverEvent:{action:show_text,value:{selector:@p}}}

The above should show my name upon hovering over "Hover", but instead shows "@p". And just an example showing "selector" at work, which simply displays my name in chat:

/tellraw @a {selector:@p}

Confirmed for 14w30a.

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. If this has been done, we can reopen the issue.

Keep in mind that the "Resolved"-Status on this ticket just means "Answered", and that we are waiting for further information on whether this issue still exists or not. We will reopen it as soon as the requested information has been delivered.

20 more comments

Affects 1.15 and 1.15.1

I'm really happy this has been fixed, but I now feel a bit sad. I've been hoping this was going to be fixed for years, as it has prevented a few of my major projects from working,but no longer have the time to spend working on them.

I hope others that had this issue are able to revisit their old designs and finally incorporate values on hover, and maybe I'll try to squeeze in some Minecraft time. 🙂

Maxwell Souza Carvalho

AlexMCool

boq

Confirmed

Commands

Minecraft 14w21b, Minecraft 14w26b, Minecraft 14w29b, Minecraft 14w30a, Minecraft 1.8, ..., 1.15.2, 20w06a, 20w08a, 20w09a, 20w10a

20w17a

Retrieved