Arqade Asked on January 11, 2021
JSON text format in Bedrock Edition is very different from that in Java Edition.
The possible elements to go in the {"rawtext":[]}
component are:
text
translate
with
As you can see it is a very limited selection. This also means that there is no way to output a scoreboard score or a target selector’s result to the chat. Is that right, or is there an alternate way to output these?
As of November 17, 2020, this has been made possible with the 1.16.100 update. This update includes changes to command format, including the addition of selectors and scores to the Bedrock Edition /tellraw
command. These act the same as their Java Edition counterparts, meaning the commands that you know and love in Java Edition will be the same when they are added to Bedrock Edition.
/tellraw @a [{"selector":"@p"},{"text":" has won the game!"}]
will work!/tellraw @a [{"text":"You have "},{"score":{"name":"","objective":"lives"}},{"text":"lives left."}]
will work!Remember, while these new JSON features have been added to Bedrock Edition to make it more like Java Edition's ways, they are still not the same. The following items will still be different:
§
with formatting codes. For example:{"text":"Test","bold":true}
→ {"text":"§lTest"}
/give
command through a little extra work.Correct answer by ExpertCoder14 on January 11, 2021
if you're still looking
/tellraw @a ["",{"text":"Your score: "},{"score":{"name":"@a","objective":"your score name"}}]
Answered by Tom Tom on January 11, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP