2

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.

3 Answers 3

2

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"}]
2
  • TY but how do i make the text clickable Commented Mar 17, 2016 at 19:48
  • also thx for editing it to make it sound better :D Commented Mar 17, 2016 at 19:49
0

You can use tellraw (and other JSONish commands as /title etc) command generator, located here: Minecraft JSON generator

You can pick colors from color picker and add text pieces as you need. It also has preview visible when you add new parts of text. You can also choose the styles and click events for each piece of text.

Look at the outputted code for learning how added pieces of text influence the command.

Don't forget to use commandblock for too long commands. Enjoy.

0

If you are using MCBE, use these following commands:

/tellraw @a {"rawtext":[{"text":"Example Text"}]}

If you want to make command outputs, use:

/tellraw @a {"rawtext":[{"translate":"commands.(command).success","with":["1","2","3","4"]}]}

Get more info at https://minecraft.wiki/w/Commands/tellraw#Bedrock_Edition.2FPocket_Edition

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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