Minecraft – How to use the /tellraw command

minecraft-commandsminecraft-java-edition

I'm trying to do the /tellraw command. I know how but I want to know how to make text with more than one color and with click events.

Best Answer

The extra list holds "extra" text components that you can stylize:

/tellraw @a {"text":"","extra":[{"text":"blue","color":"blue"},{"text":"green","color":"green"}]}

Note that they will inherit from the parent. For example, everything inside extra will be bold unless set to false for specific components:

/tellraw @a {"text":"All bold","bold":true,"extra":[{"text":"blue","color":"blue"},{"text":"green","color":"green"}]}

You can instantiate as a list to essentially start within extra, saving on characters. If doing so, the very first record listed will act as the root parent:

/tellraw @a [{"text":"blue","color":"blue"},{"text":"green","color":"green"}]

/tellraw @a [{"text":"All bold","bold":true},{"text":"blue","color":"blue"},{"text":"green","color":"green"}]
Related Topic