Team (Data Type)

A scoreboard team, given either by name or as a set of properties to match.

Describes a scoreboard team. Accepts either a string (the team’s name) or an object whose fields are matched against — or applied to — a team.

As a string

"team": "red"

Equivalent to {"name": "red"}.

As an object

Every field is optional. When used in a condition, all the fields you specify must match; fields you leave out are ignored. When used in apoli:team, the fields you specify are the ones that get changed.

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_visibilityStringSame four values as nametag_visibility.
collision_ruleStringalways, never, pushOtherTeams or pushOwnTeam.
colorStringA formatting colour name, e.g. red, dark_aqua.

nametag_visibility, death_message_visibility and collision_rule also accept snake_case spellings (hide_for_other_teams, push_own_team, …).

The camelCase field spellings used by Eggolib — friendlyFire, showFriendlyInvisibles, nametagVisibility, deathMessageVisibility, collisionRule — are accepted as aliases, so eggolib:in_team JSON loads unchanged.

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

Used by