getCustomNametagTeam

fun Entity.getCustomNametagTeam(scoreboard: Scoreboard, sort: String, prefix: Component? = null, suffix: Component? = null): Team

Retrieves or creates a custom nametag team for the player in the specified scoreboard.

This function constructs a unique team name using the player's unique ID, a custom identifier, and a sorting key. If a team with the constructed name does not already exist in the scoreboard, it registers a new team and applies the provided prefix and suffix to it.

Return

The custom Team associated with the player, either newly created or existing.

Parameters

scoreboard

The scoreboard in which the team will be retrieved or created.

sort

A sorting key used as part of the team's unique name, will determine the sorting from a - z in tab.

prefix

An optional component to set as the team's prefix. Defaults to null.

suffix

An optional component to set as the team's suffix. Defaults to null.


fun Entity.getCustomNametagTeam(scoreboard: Scoreboard, sort: String, prefix: String? = null, suffix: String? = null): Team

Retrieves or creates a custom nametag team for the player in the specified scoreboard.

This function constructs a unique team name using the player's unique ID, a custom identifier, and a sorting key. If a team with the constructed name does not already exist in the scoreboard, it registers a new team and applies the provided prefix and suffix to it.

Return

The custom Team associated with the player, either newly created or existing.

Parameters

scoreboard

The scoreboard in which the team will be retrieved or created.

sort

A sorting key used as part of the team's unique name, will determine the sorting from a - z in tab.

prefix

An optional minimessage string to set as the team's prefix. Defaults to null.

suffix

An optional minimessage string to set as the team's suffix. Defaults to null.