I'm working on an adventure map. I have characters that when you click on a sign that says: (Character name here) Click to talk.
I used this command:
/give @p sign 1 0 {
BlockEntityTag: {
Text1: "{\"text\":\"Wounded Man\",\"color\":\"red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"say Wounded man: Who are you? Doesn't matter. There's a storm coming I suggest You find Shelter.\"}}",
Text2: "{\"text\":\"Click to talk\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"say New Quest: Find Shelter\"}}",
Text3: "{\"clickEvent\":{\"action\":\"run_command\",\"value\":\"particle fireworksSpark\"}}"
},
display: {
Name: "Custom Sign"
}
}
I wanted it to say: (@) Wounded Man: A storm's coming I suggest you find shelter...
, but instead it says: (LordSockingham) Wounded man: A storm's coming and I suggest you find shelter...
. Any ideas?
Best Answer
The problem is that the player is the one who is running the command with JSON commands. One possible workaround is the
/trigger
command:Before anything else, once:
On a repeatingCommandBlock/chainCommandBlock loop, in order:
On the sign: