Can you use json codes on signs in Minecraft?

Can I use a json code on signs? I tried /tellraw @p {text"hi",color:blue} and it worked as expected, but can you use them for signs?

2

2 Answers

When you're making signs with colored text, you have can only do it with the /setblock command. Also, remember that you cannot use the Selection Symbol (ยง) in chat. So, this is how you create a sign with color.

(Or you can look up the wiki)


Place a command block ABOVE where you want your sign to go.

Use /setblock ~ ~-1 ~ standing_sign [Rotation] replace {Text1:"{Text:"[Text String]",color:[Color]}",Text2:"{Text:"[Text String]",color:[Color]}",Text3:"{Text:"[Text String]",color:[Color]}",Text4:"{Text:"[Text String]",color:[Color]}"}
Of course, it won't fit in your hotbar. So, put it on a command block directly above where you would like to place the block and then activate it.

Replace [Rotation] with a number between 0 and 15. 0 faces South, 4 faces West, 8 faces North and 12 faces East. 16 (the same as 0) will face South.
Replace [Text String] with the json string that you want the sign to contain... Or plain text. As long as everything fits on the sign, it will not be chopped off.
Replace [Color] with a color; "Red", "Blue", "Yellow", "Green", "Gold", "Gray" are some examples. (As long as it's a color that Minecraft chat supports).

1

In the new version (1.8) of MC, they changed alot of things, an example is server configs are now JSON files, Mojang tried to have more modability power for the player, without installing mods!

This also means that you can implent JSON code in Signs, Books, Command Blocks and any text container.

However, you need the /setblock command, the /give command, or incase of Bukkit/Spigot etc. the commands for altering/giving items, that belong to the build (this also go for plugins!).

More info on the sign item, and how to use it with JSON can be found on here.

You Might Also Like