Minecraft Wiki
Advertisement
Information icon
This feature is exclusive to Java Edition. 

Controls teams.

Syntax[]

team list [<team>]
Lists all teams, with their display names and the amount of entities in them. The optional <team> can be used to specify a particular team.
team add <team> [<displayName>]
Creates a team with the given name and optional display name. <displayName> defaults to <team> when unspecified.
team remove <team>
Deletes the specified team.
team empty <team>
Removes all members from the named team.
team join <team> [<members>]
Assigns the specified entities to the specified team. If no entities is specified, makes the executor join the team.
team leave <members>
Makes the specified entities leave their teams.
team modify <team> <option> <value>
Modifies the options of the specified team.

Arguments[]

<team>: team (in list, remove, empty, join, and modify mode)

Specifies the name of a team.
Must be a team name of an unquoted string. Allowed characters include: -, +, ., _, A-Z, a-z, and 0-9.

<team>: string (in add mode)

Specifies the name for a new team.
Must be a string. And it must be in a single word (Allowed characters include: -, +, ., _, A-Z, a-z, and 0-9).

<displayName>: component

Specifies the team name to be displayed.
Must be a raw JSON text.

<members>: score_holder

Specifies the entities to join or leave the team.
Must be a selection of score holders. It may be either a target selector, a player name, a UUID, or * for all score holders tracked by the scoreboard. Named player needn't be online, and it even needn't be a real player's name.

<option>

A specific option to change.
Value must be one of the following:
  • displayName: Set the display name of the team.
  • color: Decide the color of the team and players in chat, above their head, on the Tab menu, and on the sidebar. Also changes the color of the outline of the entities caused by the Glowing effect.
  • friendlyFire: Enable/Disable players inflicting damage on each other when on the same team. (Note: players can still inflict status effects on each other.) Does not affect some non-player entities in a team.
  • seeFriendlyInvisibles: Decide players can see invisible players on their team as whether semi-transparent or completely invisible.
  • nametagVisibility: Decide whose name tags above their heads can be seen.
  • deathMessageVisibility: Control the visibility of death messages for players.
  • collisionRule: Controls the way the entities on the team collide with other entities.
  • prefix: Modifies the prefix that displays before players' names.
  • suffix: Modifies the suffix that displays after players' names.

<value>

Specifies the value to set <option> to.
Shown below are the values for each option.
  • For displayName:
  • For color:
    • <value>: color - Must be a raw JSON text.
      • Defaults to reset. If reset, names are shown in default color and formatting.
  • For friendlyFire:
    • <allowed>: boolean - Must be a raw JSON text.
      • true - (Default) Enable players inflicting damage on each other when in the same team.
      • false - Disable players inflicting damage on each other when in the same team.
  • For seeFriendlyInvisibles:
    • <allowed>: boolean - Must be a raw JSON text.
      • true - (Default) Can see invisible players on the same team semi-transparently.
      • false - Cannot see invisible players on the same team.
  • For nametagVisibility:
    • never - Name above player's head cannot be seen by any players.
    • hideForOtherTeams - Name above player's head can be seen only by players in the same team.
    • hideForOwnTeam - Name above player's head cannot be seen by all the players in the same team.
    • always - (Default) Name above player's head can be seen by all the players.
  • For deathMessageVisibility:
    • never - Hide death message for all the players.
    • hideForOtherTeams - Hide death message to all the players who are not in the same team.
    • hideForOwnTeam - Hide death message to players in the same team.
    • always - (Default) Make death message visible to all the players.
  • For collisionRule:
    • always - (Default) Normal collision.
    • never - No entities can push entities in this team.
    • pushOtherTeams - Entities in this team can be pushed only by other entities in the same team.[1]
    • pushOwnTeam - Entities in this team cannot be pushed by another entity in this team.[1]
  • For prefix:
  • For suffix:

Result[]

CommandTriggerJava Edition
anythe arguments are not specified correctly Unparseable
/team list <team>
/team remove ...
/team empty ...
/team join ...
/team modify ...
<team> doesn't exist Failed
/team add ...the named <team> already exists
/team empty ...the <team> is already empty
/team join ...<members> is not specified when the command's executor is not an entity
<members> fails to resolve to one or more entities
/team leave ...<members> fails to resolve to one or more entities Failed
/team modify displayName ...
/team modify color ...
/team modify friendlyFire ...
/team modify seeFriendlyInvisibles ...
/team modify nametagVisibility ...
/team modify deathMessageVisibility ...
/team modify collisionRule ...
the specified value is the same as current value
anyOtherwiseSuccessful

Output[]

CommandEditionSituationSuccess Count/execute store success .../execute store result ...
anyJava EditionOn fail000
/team listOn success11the number of existing teams
/team list <team>On success11the number of members in the <team></team>
/team add ...
/team remove ...
On success11the number of existing teams after execution
/team empty ...On success11the number of members in the team before execution
/team joinOn success111
/team join <members>On success11the number of specified entities
/team leave ...On success11the number of specified entities
/team modify displayName ...
/team modify color ...
/team modify friendlyFire ...
/team modify seeFriendlyInvisibles ...
/team modify nametagVisibility ...
/team modify deathMessageVisibility ...
/team modify collisionRule ...
On success110
/team modify prefix ...
/team modify suffix ...
On success111

History[]

Java Edition
1.1317w45aAdded /team.
18w20aAdded /team option <team> prefix <prefix>.
Added /team option <team> suffix <suffix>.
pre8/team option is now /team modify
Added /team modify <teamName> displayName.
Team names are now text components, not raw strings.
1.1821w37aRemoved 16 characters limit for the name of a team, and 40 characters limit for the name of members.

See also[]

  • /scoreboard — manages scoreboard objectives, players and displays
  • /tag – tags players with a certain string

References[]

  1. a b MC-87984
Advertisement