Scoreboard instance.
Creating and retrieving teams
Usescoreboard.team(String name) to create a team or retrieve an existing one by the same name. This is the primary way to work with teams — it is safe to call repeatedly with the same name.
getTeam(String name). It returns null if no team with that name exists:
Team properties
Once you have aTeam reference, you can configure its visual and gameplay properties. All setter methods return the Team instance, so you can chain them.
TeamColor values: BLACK, DARK_BLUE, DARK_GREEN, DARK_AQUA, DARK_RED, DARK_PURPLE, GOLD, GRAY, DARK_GRAY, BLUE, GREEN, AQUA, RED, LIGHT_PURPLE, YELLOW, WHITE
TeamCollisionRule values: NEVER, FOR_OWN_TEAM, FOR_OTHER_TEAMS, ALWAYS
TeamNameTagVisibility values: NEVER, FOR_OWN_TEAM, FOR_OTHER_TEAMS, ALWAYS
Members
Add or remove players and entities from a team using the following methods:Fluent API
AllTeam setter methods return the Team instance, so you can chain configuration into a single expression. This is the recommended way to set up a team.
removeTeam(String name) on the scoreboard. To remove all teams at once, use clearTeams():