1

{Command:} NBT isn't working with tellraw

Discontinued-'s Avatar Discontinued-1/21/17 9:12 pm
1 emeralds 535 2
1/22/2017 8:08 am
Discontinued-'s Avatar Discontinued-
Hi there peoplez. I was making a command block creation (Like I always do) and something didn't work. Can someone please help me with this command.

/setblock ~2 ~ ~ command_block 0 replace {Command:"/tellraw @a ["",{"text":"[Weak Hoe?!] ","color":"green"},{"text":"Get a golden hoe."}]Styled text only (Minecraft JSON Format)"}

BTW, if you want to know what I am making, I am making "Such Achievements" which is a structure that adds more achievements to Minecraft. Thanks for your answers! ^.^
Posted by Discontinued-'s Avatar
Discontinued-
Level 1 : New Blacksmith
3

Create an account or sign in to comment.

2

1
01/22/2017 8:08 am
Level 1 : New Blacksmith
Discontinued-
Discontinued-'s Avatar
Oh thanks! I will try that out.
1
01/22/2017 7:18 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
The problem is that you're using nested quotation marks.

This is what the game sees:
/setblock ~2 ~ ~ command_block 0 replace {Command:
"/tellraw @a ["
",{"
text
":"
etc....

See how it's mismatching the quotation marks?. The solution is to use \" inside the {Command:" COMMAND HERE "} part.

So:
/setblock ~2 ~ ~ command_block 0 replace {Command:"/tellraw @a [\"\",{\"text\":\"[Weak Hoe?!] \",\"color\":\"green\"},{\"text\":\"Get a golden hoe.\"}]"}
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome