Teams
Auto-generated from
src/stdlib/teams.mcrs— do not edit manually.
API
- create_team
- create_red_team
- create_blue_team
- create_green_team
- create_yellow_team
- add_to_team
- remove_from_teams
- setup_two_teams
- setup_four_teams
- cleanup_teams
create_team
Creates a team and applies a display color.
fn create_team(name: string, color: string)Parameters
| Parameter | Description |
|---|---|
name | Team name used by the scoreboard team system |
color | Minecraft team color string such as red or blue |
Example
create_team("spectator", "gray")create_red_team
Creates the standard red team with friendly fire disabled.
fn create_red_team()Example
create_red_team()create_blue_team
Creates the standard blue team with friendly fire disabled.
fn create_blue_team()create_green_team
Creates the standard green team with friendly fire disabled.
fn create_green_team()create_yellow_team
Creates the standard yellow team with friendly fire disabled.
fn create_yellow_team()add_to_team
Adds an entity or player selector to a team.
fn add_to_team(target: selector, team_name: string)Parameters
| Parameter | Description |
|---|---|
target | Target selector to join the team |
team_name | Existing team name |
remove_from_teams
Removes an entity or player selector from all teams.
fn remove_from_teams(target: selector)Parameters
| Parameter | Description |
|---|---|
target | Target selector to remove from teams |
setup_two_teams
Creates the default two-team setup used by many arena games. This creates red and blue.
fn setup_two_teams()setup_four_teams
Creates the default four-team setup. This creates red, blue, green, and yellow.
fn setup_four_teams()cleanup_teams
Removes the default team set created by this module. Safe to call during cleanup even if some teams were unused.
fn cleanup_teams()