Legends:Commands/assignteam

/assignteam
Permission level
required

Unknown

Restrictions

None

Assigns a new team to an existing entity. Default teams are blue_team for blue players and their allies, red_team for orange players and their allies, and piglin_team for all piglin.

Syntax

assignteam <selector: target> <team>
Assigns a team to all entities matching the target selector.

Arguments

<selector: target>: CommandSelector<Actor>

Specifies the target(s).

<team>: enum

Specifies the team all targets are assigned to.

Examples

  • To assign yourself to the orange team you can run /assignteam @s red_team.
  • To assign the closest player to the piglin team run /assignteam @p piglin_team.