Clickable signs and sign scoreboards - minor fight
When you place a scoreboard display and a clickEvent in one sign, the order of the code seems to matter.
For example:
/give @p sign 1 0 {BlockEntityTag:{Text1:"
",Text2:"{\"text\":\"some text\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/scoreboard players set @p objective2 1\"}}",Text3:"[\"\",{\"score\":
{\"name\":\"dummy_player\",\"objective\":\"objective1 \"},\"color\":\"red\"},
{\"text\":\"xtra\",\"color\":\"none\"}]",Text4:"[\"\",
{\"text\":\"last text\"}]"}}
worked.
However:
/give @p sign 1 0 {BlockEntityTag:{Text1:"
",Text2:"
{\"text\":\"some text\"}",Text3:"[\"\",{\"score\":
{\"name\":\"dummy_player\",\"objective\":\"objective1 \"},\"color\":\"red\"},
{\"text\":\"xtra\",\"color\":\"none\"}]",Text4:"[\"\",{\"text\":\"last text\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/scoreboard players set @p objective2 1\"}}]"}}
will display the text along with the scoreboard objective perfectly, but will not run the clickEvent code.
2016-01-12, 09:26 PM
2016-01-12, 11:11 PM
2016-01-12, 11:11 PM
0
1
-