0

I want a line of text to appear in the chat, that when clicked on will execute a /fill command.

I have used the following command to no avail: (~ = desired message or command)

/tellraw @a {"text":"~","clickEvent":{"action":run_command","value":"/~"}}

This command seems like it would work, but it says that it needs an "array."

/execute @a ~ ~ ~ tellraw @p {"nbt":"","storage":"Why would I do that?","italic":true,"underlined":true,"color":"yellow","clickEvent":{"action":"run_command","value":"/fill <> <to> <block>"}}

2 Answers 2

2

You can't do this in Bedrock Edition, only in Java Edition. Raw JSON text is much more limited in Bedrock Edition, so much so that you can't even change the color or other formatting using JSON tags (you should still be able to use formatting codes), much less use the interactive features that make tellraw so powerful in Java Edition.

1
  • So it seems you can change the color, but it doesn't use the JSON formatting that Java Edition uses. Still can't change the style though, unless I missed something. This is some documentation detail that's missing from the wiki.
    – MBraedley
    Commented Aug 14, 2020 at 17:19
1

There might be a simple way

I haven't tested this out but it is an idea you can look into. If you place a sign down, type whatever you like with whatever color tags, then behind it, have a comparator facing outward behind the block holding the sign. Then have a commandblock on the output side of that comparator. You right-click on the sign as if you wanted to use it. The sign might emit change significant enough to be picked up by the comparator.

1
  • Thanks, that might be pretty helpful. I probably should have clarified this, but I am looking for clickable text specifically in the chat. But thank you, I will probably use this in the future. Commented Aug 15, 2020 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.