Skip to main content

Team (Data Type)

Describes a scoreboard team. It accepts either a string, which is the team's name, or an object whose fields are matched against a team, or applied to it.

As a string

"team": "red"

This is the same as {"name": "red"}.

As an object

Every field is optional. In a condition, all the fields you write must match, and the fields you leave out are ignored. In apoli:team, the fields you write are the ones that change.

FieldTypeDescription
nameStringThe team's name, as used by /team.
friendly_fireBooleanWhether members can damage each other.
see_friendly_invisiblesBooleanWhether members can see invisible teammates.
nametag_visibilityStringalways, never, hideForOtherTeams or hideForOwnTeam.
death_message_visibilityStringThe same four values as nametag_visibility.
collision_ruleStringalways, never, pushOtherTeams or pushOwnTeam.
colorStringA formatting colour name, such as red or dark_aqua.

nametag_visibility, death_message_visibility and collision_rule also accept snake_case spellings, such as hide_for_other_teams and push_own_team.

The camelCase field names Eggolib uses (friendlyFire, showFriendlyInvisibles, nametagVisibility, deathMessageVisibility and collisionRule) are accepted as aliases, so eggolib:in_team JSON loads unchanged.

"team": {
  "name": "red",
  "friendly_fire": false,
  "nametag_visibility": "never"
}

Used by