1

I would like to know if it possible to use teams with the tellraw command.

I know that you can use it to select players (e.g. /tellraw @a {"text":"","color":"blue","extra":[{"selector":"@p"},{"text":" has won the game!"}]}), but is it possible to do this for teams?

I'm using Minecraft version 1.15.2 and am in a Superflat world in Creative Mode.

2
  • 2
    What do you mean? All players on a team? Of course, just using the team selector. Or something else? Them please say what output you would expect in an example case. Commented Apr 1, 2020 at 22:20
  • Also, you don't need to use the extra tag, you can just enclose all components in square brackets. eg. /tellraw @a [{"color":"yellow"text":"One"},{"color":"white","text":" and "},{"color":"yellow","text":"Two"}]
    – AMJ
    Commented Apr 2, 2020 at 4:07

1 Answer 1

3

Of course it's possible.

Just change the selector in the "selector" tag to change who is said in the message, or the selector at the start to change who the message is displayed to.

Examples:

/tellraw @a[team=teamA] [{"text":"Congratulations, Team A! You have won the game!"}]
DISPLAYS TO:   Everyone on team A.
MESSAGE READS: Congratulations, Team A! You have won the game!

Or:

/tellraw @a [{"text":"Congratulations, "}, {"selector":"@a[team=teamA]"}, {"text":"! You have won the game!"}]
DISPLAYS TO:   Everyone.
MESSAGE READS: Congratulations, ExpertCoder14, User2, and User3! You have won the game!

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.