Skip to content
WikilyWIKILY
All games23 Wikis · pick your game
Commands and cheatsAll commands

Switch game

23 Wikis · pick your game
/team

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.

Syntax

/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>)

Arguments

ArgumentKind of valueWhat to type
<team>TextThe 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 componentThe name shown for the team, as a text component, for example "Red Team" or {text:"Red Team",color:"red"}.
<members>Score holderWho joins or leaves: a selector, player names, any other score holder names, or * for every name the scoreboard tracks.
<value>Team colorThe 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 falsetrue or false, for friendlyFire and seeFriendlyInvisibles.
<prefix>Text componentA text component placed before the names of the team members.
<suffix>Text componentA text component placed after the names of the team members.

Details

Permission level2: operators, worlds with cheats on, command blocks and functions
Works inServer operators, players in a singleplayer or LAN world with cheats enabled, the server console, command blocks and functions.
ResultEach 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 collisionRuleAllowed 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 deathMessageVisibilityAllowed values: always, never, hideForOtherTeams, hideForOwnTeam. Default: always.
modify nametagVisibilityAllowed values: always, never, hideForOtherTeams, hideForOwnTeam. Default: always.
modify friendlyFiretrue or false: whether team members can hurt each other. Default: true.
modify seeFriendlyInvisiblestrue or false: whether team members can see invisible teammates. Default: true.
modify displayName, prefix, suffixEach 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 changedSetting collisionRule, color, deathMessageVisibility, nametagVisibility, friendlyFire, seeFriendlyInvisibles or displayName to the value it already has fails with a "Nothing changed" message.

Examples

/team add red "Red Team"

Creates the team red with the display name Red Team.

/team join red @p

Puts the nearest player on team red.

/team modify red color red

Sets the color of team red to red.

/team modify red friendlyFire false

Stops members of team red from hurting each other.

/team modify red nametagVisibility hideForOtherTeams

Hides 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 never

Turns off pushing for members of team red.

/team list red

Lists the members of team red.

/team leave @a

Removes every player from their team.

/team empty red

Removes all members from team red but keeps the team.

/team remove red

Deletes team red.

Join the creator communityThe people who build the Minecraft Java Edition wiki are on our Discord. Ask questions or suggest pages.Join Discord (opens Discord in a new tab)