Commands/team

From Minecraft Wiki
Jump to: navigation, search
team
Restrictions

Operator

First introduced

Java Edition 1.13 (17w45a)

Information icon.svg
This feature is exclusive to Java Edition.

Controls teams.

Syntax[edit]

team add <team> [<displayName>]
team empty <team>
team join <team> [<members>]
team leave <members>
team list [<team>]
team modify <team> <option> <value>
team remove <team>

Arguments[edit]

<team>

Specifies the name of the team.

<displayName>

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

<members>

Specifies the entities to join or leave the team. Must be a plain text representing a player name, or be a target selector.
Permits entities other than players.
"*" may be used to represent all entities tracked by the scoreboard.

<option>

A specific option to change.
Value must be one of the following:
collisionRule: Decide what entities entities on this team can push.
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.
deathMessageVisibility: Decide whose death messages can be seen in chat.
displayName: Set the display name of the team.
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 non-player entities on a team.
nametagVisibility: Decide whose name tags above their heads can be seen.
prefix: Modifies the prefix that appears before players' names in chat.
seeFriendlyInvisibles: Decide if players can see invisible players on their team as semi-transparent or completely invisible.
suffix: Modifies the suffix that appears after players' names in chat.

<value>

Specifies the value to set <option> to.
Shown below are the values for each option.
  • For collisionRule:
    • always - (Default) Normal collision.
    • never - No entities can push entities on this team.
    • pushOtherTeams - Entities on this team can be pushed only by another entity on this team.
    • pushOwnTeam - Entities on this team cannot be pushed by another entity on this team.
  • For color:
    • aqua
    • black
    • blue
    • dark_aqua
    • dark_blue
    • dark_gray
    • dark_green
    • dark_purple
    • dark_red
    • gold
    • gray
    • green
    • light_purple
    • red
    • reset - (Default) reset the color.
    • yellow
    • white
  • For deathMessageVisibility:
    • never - Hide deathmessage for every players.
    • hideForOtherTeams - Hide deathmessage to every players who are not on the same team.
    • hideForOwnTeam - Hide deathmessage to players on the same team.
    • always - (Default) Make deathmessage visible to every players.
  • For displayName:
    • <displayName> - Specifies the team name to be displayed. Must be a plain text or a valid raw JSON text.
  • For friendlyFire
    • true - (Default) Enable players inflicting damage on each other when on the same team.
    • false - Disable players inflicting damage on each other when 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 on the same team.
    • hideForOwnTeam - Name above player's head cannot be seen by any players on the same team.
    • always - (Default) Name above player's head can be seen by any players.
  • For prefix:
    • <prefix> - Specifies the prefix. Must be a plain text or a valid raw JSON text.
  • For seeFriendlyInvisibles:
    • true - (Default) Can see invisible players on the same team.
    • false - Cannot see invisible players on the same team.
  • For suffix:
    • <suffix> - Specifies the suffix. Must be a plain text or a valid raw JSON text.

Result[edit]

Fails if the arguments are not specified correctly or if <targets> fails to resolve to one or more entities.

  • add — Fails if the team already exists. On success, creates a new team.
  • empty — Fails if the team does not exist or is already empty. On success, removes all members from a team.
  • join — Fails if the team does not exist or if <members> fails to resolve to one or more online players or entities. On success, makes <members> join a team.
  • leave — Fails if <members> fails to resolve to one or more online players or entities. On success, makes a player leave a team.
  • list — Fails if the team does not exist. Lists all teams, or lists all members of a team if <team> is set.
  • modify — Fails if the team does not exist or if the specified value is the same as the current value. On success, sets the <option> of a team to the specified value.
  • remove — Fails if the team does not exist. On success, Removes the team.

History[edit]

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.

See also[edit]

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