
Command
/team
Creates and removes teams, moves players and other entities in and out of them, and changes team options such as color, friendly fire and name tag visibility.
| /team add <team> [<displayName>] |
| /team (empty <team>|leave <members>|remove <team>) |
| /team join <team> [<members>] |
| /team list [<team>] |
| /team modify <team> collisionRule (always|never|pushOtherTeams|pushOwnTeam) |
| /team modify <team> color reset |
| /team modify <team> color <value> |
| /team modify <team> (deathMessageVisibility|nametagVisibility) (always|hideForOtherTeams|hideForOwnTeam|never) |
| /team modify <team> (displayName <displayName>|friendlyFire <allowed>|prefix <prefix>|seeFriendlyInvisibles <allowed>|suffix <suffix>) |
| Argument | Kind of value | What to type |
|---|---|---|
| <team> | Text | The team name. For add it is a new name, a single word without spaces. For every other sub-command it must be an existing team. One word without spaces. |
| <displayName> | Text component | The name shown for the team, as a text component, for example "Red Team" or {text:"Red Team",color:"red"}. |
| <members> | Score holder | Who joins or leaves: a selector, player names, any other score holder names, or * for every name the scoreboard tracks. |
| <value> | Team color | The team color. One of black, dark_blue, dark_green, dark_aqua, dark_red, dark_purple, gold, gray, dark_gray, blue, green, aqua, red, light_purple, yellow, white. |
| <allowed> | True or false | true or false, for friendlyFire and seeFriendlyInvisibles. |
| <prefix> | Text component | A text component placed before the names of the team members. |
| <suffix> | Text component | A text component placed after the names of the team members. |
| Permission level | 2: operators, worlds with cheats on, command blocks and functions |
| Works in | Server operators, players in a singleplayer or LAN world with cheats enabled, the server console, command blocks and functions. |
| Result | Each sub-command reports what changed. Returned values: add and remove return the number of teams that exist afterwards, empty returns the number of members removed, join and leave return the number of members added or removed, list returns the number of teams or the number of members of the given team, prefix and suffix return 1, and every other modify option returns 0. |
| add | /team add <team> [displayName] creates a team. Without a display name, the team name is used as its display name. Fails with "A team already exists by that name" if the name is taken. |
| remove | /team remove <team> deletes the team. |
| empty | /team empty <team> removes every member from the team but keeps the team. Fails if the team is already empty. |
| join | /team join <team> [members] adds members to the team. Without members, the entity running the command joins. A member can be on only one team, so joining a team removes it from its previous team. |
| leave | /team leave <members> removes the members from whatever team they are on. |
| list | /team list shows all teams. /team list <team> shows the members of that team. |
| modify collisionRule | Allowed values: always, never, pushOtherTeams, pushOwnTeam. Default: always. |
| modify color | /team modify <team> color <value> sets the team color; /team modify <team> color reset clears it. Allowed colors: black, dark_blue, dark_green, dark_aqua, dark_red, dark_purple, gold, gray, dark_gray, blue, green, aqua, red, light_purple, yellow, white. A new team has no color. |
| modify deathMessageVisibility | Allowed values: always, never, hideForOtherTeams, hideForOwnTeam. Default: always. |
| modify nametagVisibility | Allowed values: always, never, hideForOtherTeams, hideForOwnTeam. Default: always. |
| modify friendlyFire | true or false: whether team members can hurt each other. Default: true. |
| modify seeFriendlyInvisibles | true or false: whether team members can see invisible teammates. Default: true. |
| modify displayName, prefix, suffix | Each takes a text component. displayName changes the name shown for the team; prefix and suffix are placed before and after the names of the members. |
| Nothing changed | Setting collisionRule, color, deathMessageVisibility, nametagVisibility, friendlyFire, seeFriendlyInvisibles or displayName to the value it already has fails with a "Nothing changed" message. |
/team add red "Red Team"Creates the team red with the display name Red Team.
/team join red @pPuts the nearest player on team red.
/team modify red color redSets the color of team red to red.
/team modify red friendlyFire falseStops members of team red from hurting each other.
/team modify red nametagVisibility hideForOtherTeamsHides the name tags of team red from players on other teams.
/team modify red prefix {text:"[RED] ",color:"red"}Shows [RED] in red before the name of each member of team red.
/team modify red collisionRule neverTurns off pushing for members of team red.
/team list redLists the members of team red.
/team leave @aRemoves every player from their team.
/team empty redRemoves all members from team red but keeps the team.
/team remove redDeletes team red.



