We've split up the commands, scripting and mods, and add ons category! Please be sure you get your thread in the right place.

7

Ability to use scoreboard values in text

1 Comments

Please sign in to leave a comment.

Sorted by oldest
  • 1
    Registered User commented
    Comment actions Permalink

    This is possible in Java Edition already, like so:

    /execute as @a run tellraw @s [{"text":"Time you've been on the world: "},{"score":{"name":"@s","objective":"ticksPlayed"}}]

    In Bedrock Edition, this is now possible in the 1.16.100 update, click here to see the Minecraft Wiki's article on the update.

    When the update is released, this will be possible using a similar syntax to Java Edition:

    /execute @a ~ ~ ~ tellraw @s {"rawtext":[{"text":"Time you've been on the world: "},{"score":{"name":"@s","objective":"ticksPlayed"}}]}

    The selector tag is also being added, so you will be able to use selectors in your raw JSON text as well.

    Notes

    Note that while this has made raw JSON text in Bedrock Edition more similar to Java Edition, they are still not the same. The following differences will still exist:

    • Formatting options: Formatting options like bold, italic, and so on will not be in-game. Use formatting codes with the section sign § instead.
    • Interactivity: Hover events, click events, and insertion text are not included in this update.
    • NBT support: NBT support has not been added to Bedrock Edition, and probably will not be added in the near future. So, the nbt tag will not be added.

    Also note that the selector and score tags require resolution, in layman's terms, that means that the value will only be calculated once. This means that the previous chat messages will not change if the score is later updated.