mojira.dev
MC-69241

/tellraw command in clickEvent on a sign doesn't work

setblock ~ ~1 ~ standing_sign 0 replace {Text1:"{color:blue,text:'Test',clickEvent:{action:run_command,value:'tellraw @p {text:"This is the output"}'}}"}

I put this command in a command block.

If I power the command block, nothing happens and the following error message appears, even though the command is correct.

[16:41:58] Data tag parsing failed: Unexpected token 'T' at: This is the output"}'}}"

Linked issues

Comments 18

You need to escape your quotes and use better syntax etc, first of all

setblock ~ ~1 ~ standing_sign 0 replace {Text1:"{"color":"blue","text":"Test","clickEvent":{"action":"run_command","value""'tellraw @p {"text":\"This is the output\"}"}}"}

Does this work, and if not what does it say

It says:

[16:50:31] Data tag parsing failed: Illegal use of \": {Text1:"{"color":"blue","text":"Test","clickEvent":{"action":"run_command","value""'tellraw @p {"text":\"This is the output\"}"}}"}

Why do you use "" after value?

setblock ~ ~1 ~ standing_sign 0 replace {Text1:"{"color":"blue","text":"Test","clickEvent":{"action":"run_command","value":"tellraw @p {\"text\":\"This is the output\"}"}}"}

whoops, try this

Also this one does not work:

[17:00:02] Data tag parsing failed: Illegal use of \": {Text1:"{"color":"blue","text":"Test","clickEvent":{"action":"run_command","value":"tellraw @p {\"text\":\"This is the output\"}"}}"}

8 more comments

So do you know what is wrong with the command I wrote or is this a bug?

Found it, I don't know why but it seems like even the ' now needs to be escaped...
MC-72194

You cannot nest quotation marks of the same type. They will always match with the nearest of the same type, unlike brackets. Brackets work because they have different symbols for the opening and closing, so it's possible to count them and match them correctly. Straight quotes, unlike curly quotes, cannot sensibly be parsed other than to match them to the nearest one.

It doesn't work for me and I really want it to!

Dejori David

(Unassigned)

Unconfirmed

Minecraft 1.8-pre1

Retrieved