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.
| Field | Type | Description |
|---|---|---|
name | String | The team's name, as used by /team. |
friendly_fire | Boolean | Whether members can damage each other. |
see_friendly_invisibles | Boolean | Whether members can see invisible teammates. |
nametag_visibility | String | always, never, hideForOtherTeams or hideForOwnTeam. |
death_message_visibility | String | The same four values as nametag_visibility. |
collision_rule | String | always, never, pushOtherTeams or pushOwnTeam. |
color | String | A 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"
}