We've split up the commands, scripting and mods, and add ons category! Please be sure you get your thread in the right place.

3

/tellraw clickEvent trigger score (Make clickEvent use JSON components)

1 Comments

Please sign in to leave a comment.

Sorted by oldest
  • 1
    Registered User commented
    Comment actions Permalink

    You are very close. This is possible, but your approach was incorrect.

    Instead of the value field being another JSON text component, try setting the inner command to /tellraw and including JSON inside the value. Like this:

    tellraw @a
    {
    "text":"Click to Show Health",
    "clickEvent":{
    "action":"run_command",
    "value":"/tellraw @s [{\"text\":\"My health is\"},{\"score\":{\"name\":\"@s\",\"objective\":\"health\"}}]"
    }
    }