How To Make Clickable Text In Minecraft

//ads -- adsterra.com -- native banner
?>
I am trying to make clickable text in Minecraft in the chat box. It was used in the adventure map, "UP".
The idea is that you are given an option in the text to click, "Yes", or "No". Each word will give an output of a command.
How is this achieved?
Best Answer
The command you would use for this is:
/tellraw @p {"text":"","extra":[{"text":" Up? ","clickEvent":{"action":"run_command","value":"/tp ~ ~ ~ "}}]}
Pictures about "How To Make Clickable Text In Minecraft"



Minecraft 1.19 - How To Make Clickable Text In Chat
More answers regarding how To Make Clickable Text In Minecraft
Answer 2
Command to kill all players on click:
/tellraw @a {"text":"Click","clickEvent":{"action":"run_command","value":"/kill @a"}
Answer 3
This command will output a text that when clicked on the command /say Hello!
will be executed
tellraw @a {"text":"Click this!","clickEvent":{"action":"run_command","value":"/say Hello!"}}
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Skylar Kang, Monstera, cottonbro, cottonbro