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 Details

    • teamManager

      @NotNull @NotNull TeamManager teamManager()
      Returns:
      TeamManager of this team
    • name

      @NotNull @NotNull String name()
      Returns:
      name of this team
    • defaultDisplay

      @NotNull @NotNull TeamDisplay defaultDisplay()
      Gets the default TeamDisplay of this team. All players are added to this display by default.
      Returns:
      default team display
    • display

      @NotNull @NotNull TeamDisplay display(@NotNull @NotNull org.bukkit.entity.Player player)
      Gets the TeamDisplay that 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 team TeamDisplay that a player sees for this team.
      Parameters:
      player - player
      teamDisplay - new TeamDisplay of player
      Throws:
      IllegalArgumentException - if player is not in the TeamManager
    • createDisplay

      @NotNull @NotNull TeamDisplay createDisplay()
      Creates a new TeamDisplay. To show it to players, use display(Player, TeamDisplay).
      Returns:
      newly created team display