i'm doing a map and i'm trying to make a conversation between the player and a villager with clikable answer in the chat like this (i'm french so the text is in fench but it doesn't matter i think)

/tellraw @a [ { "text":" Salut l'ami ! tu aime le bon bon sauciflard ?", "color":"aqua" }, { "text":"Oui", "color":"green", "clickEvent": { "action":"run_command", "value":"/setblock -87 102 158 minecraft:redstone_block" } }, { "text":"Non", "color":"red", "clickEvent": { "action":"run_command", "value":"/setblock -96 102 158 minecraft:redstone_block" } } ]

It work's but i'd like to skip a line between "oui" and "non" and i don't now how i can do it.


The \n escape code will let you start a new line. For example:

/tellraw @s "Line1\nLine2"

enter image description here

In your command:

/tellraw @a [{"text":"Salut l'ami! Tu aime le bon bon sauciflard?\n","color":"aqua"},{"text":"Oui\n","color":"green","clickEvent":{"action":"run_command","value":"/setblock -87 102 158 minecraft:redstone_block"}},{"text":"Non","color":"red","clickEvent":{"action":"run_command","value":"/setblock -96 102 158 minecraft:redstone_block"}}]
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.