TransWikia.com

Select teams using /tellraw command?

Arqade Asked by henryb66 on December 9, 2020

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.

One Answer

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!

Answered by ExpertCoder14 on December 9, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP