Interface ScoreboardTeam
public interface ScoreboardTeam
Represents a scoreboard team.
To get an instance of this interface, use
TeamManager.createIfAbsent(java.lang.String).
Note: this interface is not thread-safe, meaning you can only use it from one thread at a time,
although it does not have to be the main thread.- See Also:
-
Method Summary
Modifier and TypeMethodDescription@NotNull TeamDisplayCreates a newTeamDisplay.@NotNull TeamDisplayGets the defaultTeamDisplayof this team.@NotNull TeamDisplaydisplay(@NotNull org.bukkit.entity.Player player) Gets theTeamDisplaythat a player sees.voiddisplay(@NotNull org.bukkit.entity.Player player, @NotNull TeamDisplay teamDisplay) Updates the teamTeamDisplaythat a player sees for this team.@NotNull Stringname()@NotNull TeamManager
-
Method Details
-
teamManager
- Returns:
- TeamManager of this team
-
name
- Returns:
- name of this team
-
defaultDisplay
Gets the defaultTeamDisplayof this team. All players are added to this display by default.- Returns:
- default team display
-
display
Gets theTeamDisplaythat a player sees.- Parameters:
player- player- Returns:
- team display the player sees
- Throws:
IllegalArgumentException- if player is not in the TeamManager
-
display
void display(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull TeamDisplay teamDisplay) Updates the teamTeamDisplaythat a player sees for this team.- Parameters:
player- playerteamDisplay- newTeamDisplayof player- Throws:
IllegalArgumentException- if player is not in the TeamManager
-
createDisplay
Creates a newTeamDisplay. To show it to players, usedisplay(Player, TeamDisplay).- Returns:
- newly created team display
-