Minecraft – how can i skip a line with multiple text in tellraw

minecraft-commandsminecraft-java-edition

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":"<Bernard> 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.

Best Answer

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"}}]
Related Topic