8

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
  • (args)

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?

4
  • 3
    If it's not in the wiki, I would assume so, yes. But of course you could in some situations check every value that can occur in that situation in one command each and output accordingly. – Fabian Röling May 28 '20 at 8:15
  • I have literally never played MCBE and I have no idea how one would even check if that is true. I only want to answer if I know that it's true. – Fabian Röling Jun 5 '20 at 20:16
  • I guess that means that my initial guess is probably correct. But since one can't just read the code of MCBE, it's not completely certain. – Fabian Röling Jul 9 '20 at 8:55
  • I'm probably going to test this and give you the best answer as I know a tad of useful JSON. – Winfinity Jul 28 '20 at 3:21
1

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:

  • Text formatting: Instead of using raw JSON text, use the section sign § with formatting codes. For example:
    {"text":"Test","bold":true}{"text":"§lTest"}
  • No further changes have been made to allow NBT support. So unfortunately, you may not use raw JSON text in NBT tags, like items' custom names and lores, though you can mimic the /give command through a little extra work.
-2

if you're still looking

/tellraw @a ["",{"text":"Your score: "},{"score":{"name":"@a","objective":"your score name"}}]
3
  • 7
    Hi, this is Bedrock Edition, not Java. So that command will not work. – ExpertCoder14 May 31 '20 at 18:47
  • There is a /tellraw command in MCBE, and it does support raw JSON. @ExpertCoder14 – Winfinity Jul 29 '20 at 21:22
  • @ExpertCoder14 ...no – Winfinity Sep 11 '20 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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