I'm looking for a little help using the clickEvent tag in a sign. I'm trying to make a sign that will also tell the player something using tellraw in teh click event, but I'm getting a parsing fail error, and I think it's just something I haven't formatted correctly:
[08:45:00] Data tag parsing failed: Unexpected token 't' at: text":"NO ENTRY: ","color":"gray"},{"text":"STAFF ONLY","color":"red"}}}",Text2:"{text:\"STAFF\",bold:\"true\",color:dark_red}",Text3:"{text:\"ONLY\",bold:\"true\",color:dark_red}",Text4:"{text:\"- - - - -\",bold:\"true\",color:black}"
The nested quotes within the clickEvent still need to be escaped, because they are closing the "Text1" tag early. However, if you use a single backslash to escape, it will close the "value" tag early. The formula for determining the number of backslashes is: (current depth * 2) + 1
There are also a large number of unnecessary quotes that can be removed to simplify the process. The "value" and the clickEvent had not been closed as well. Fixed command with escaped doubles, reaching 3 backslashes per quote:
An alternative is to use single quotes instead of double quotes, as they won't immediately need to be escaped. Any further depth and they will require it:
I'm looking for a little help using the clickEvent tag in a sign. I'm trying to make a sign that will also tell the player something using tellraw in teh click event, but I'm getting a parsing fail error, and I think it's just something I haven't formatted correctly:
The original sign works fine:
But when I add the clickEvent, things fall apart:
Thanks in advance for any help!
The nested quotes within the clickEvent still need to be escaped, because they are closing the "Text1" tag early. However, if you use a single backslash to escape, it will close the "value" tag early. The formula for determining the number of backslashes is: (current depth * 2) + 1
An alternative is to use single quotes instead of double quotes, as they won't immediately need to be escaped. Any further depth and they will require it:There are also a large number of unnecessary quotes that can be removed to simplify the process. The "value" and the clickEvent had not been closed as well. Fixed command with escaped doubles, reaching 3 backslashes per quote:
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
Ah, that's done it! Thanks!