Interface TeamDisplay


@NonExtendable public interface TeamDisplay
Represents the display properties of a scoreboard team. 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.
  • Method Details

    • team

      @NotNull @NotNull ScoreboardTeam team()
      Returns:
      team which this team display is assigned to
    • entries

      @NotNull @NotNull Collection<String> entries()
      Gets the entries. The entries specify which players are members of the team.
      Returns:
      entries of the team.
    • addEntry

      boolean addEntry(@NotNull @NotNull String entry)
      Adds an entry.
      Parameters:
      entry - entry to add
      Returns:
      whether the entry was added
      See Also:
    • removeEntry

      boolean removeEntry(@NotNull @NotNull String entry)
      Removes an entry.
      Parameters:
      entry - entry to remove
      Returns:
      whether the entry was removed
      See Also:
    • displayName

      @NotNull @NotNull net.kyori.adventure.text.Component displayName()
      Returns:
      display name, defaults to Component.empty()
    • displayName

      @NotNull @NotNull TeamDisplay displayName(@NotNull @NotNull net.kyori.adventure.text.ComponentLike displayName)
      Updates the display name.
      Parameters:
      displayName - new display name
    • prefix

      @NotNull @NotNull net.kyori.adventure.text.Component prefix()
      Gets the prefix, which defaults to Component.empty(). The suffix is prepended to all team members' names.
      Returns:
      prefix, defaults to Component.empty()
    • prefix

      @NotNull @NotNull TeamDisplay prefix(@NotNull @NotNull net.kyori.adventure.text.ComponentLike prefix)
      Updates the prefix.
      Parameters:
      prefix - new prefix
      See Also:
    • suffix

      @NotNull @NotNull net.kyori.adventure.text.Component suffix()
      Gets the suffix, which defaults to Component.empty(). The suffix is appended to all team members' names.
      Returns:
      suffix
    • suffix

      @NotNull @NotNull TeamDisplay suffix(@NotNull @NotNull net.kyori.adventure.text.ComponentLike suffix)
      Updates the suffix.
      Parameters:
      suffix - new suffix
      See Also:
    • friendlyFire

      boolean friendlyFire()
      Returns:
      friendly fire rule value, defaults to false
    • friendlyFire

      @NotNull @NotNull TeamDisplay friendlyFire(boolean friendlyFire)
      Updates the friendly fire rule.
      Parameters:
      friendlyFire - new rule value
    • canSeeFriendlyInvisibles

      boolean canSeeFriendlyInvisibles()
      Gets the can see friendly invisibles rule value, which is false by default. If true, team members can see other members with the invisibility effect.
      Returns:
      rule value
    • canSeeFriendlyInvisibles

      @NotNull @NotNull TeamDisplay canSeeFriendlyInvisibles(boolean canSeeFriendlyInvisibles)
      Updates the can see friendly invisibles rule.
      Parameters:
      canSeeFriendlyInvisibles - new rule value
      See Also:
    • nameTagVisibility

      @NotNull @NotNull NameTagVisibility nameTagVisibility()
      Returns:
      name tag visibility rule value
    • nameTagVisibility

      @NotNull @NotNull TeamDisplay nameTagVisibility(@NotNull @NotNull NameTagVisibility nameTagVisibility)
      Updates the name tag visibility rule.
      Parameters:
      nameTagVisibility - new rule value
    • collisionRule

      @NotNull @NotNull CollisionRule collisionRule()
      Returns:
      collision rule
      Since:
      Minecraft 1.9
    • collisionRule

      @NotNull @NotNull TeamDisplay collisionRule(@NotNull @NotNull CollisionRule collisionRule)
      Updates the collision rule.
      Parameters:
      collisionRule - new rule value
      Since:
      Minecraft 1.9
    • playerColor

      @Nullable @Nullable net.kyori.adventure.text.format.NamedTextColor playerColor()
      Gets the player color. The player color is the color player name tags are displayed in. It is also used for displaying team specific sidebars with the ObjectiveDisplaySlot.TeamSidebar} display slot.
      Returns:
      player color
    • playerColor

      @NotNull @NotNull TeamDisplay playerColor(@Nullable @Nullable net.kyori.adventure.text.format.NamedTextColor playerColor)
      Updates the player color.
      Parameters:
      playerColor - new player color
      See Also: