Interface AbstractTeam

All Known Implementing Classes:
BukkitTeamImpl, FoliaTeamImpl

public interface AbstractTeam
Represents a team that can be used to manage entries and their display properties. This is an abstraction over the underlying Team and ScoreboardTeam objects. Entries can be either player display names (usernames) or entity UUIDs represented as strings.
  • Method Details

    • addEntry

      void addEntry(String entry)
      Adds an entry to the team. For players, this should be their display name (username). For entities, this should be their UUID represented as a string.
      Parameters:
      entry - Entry to add.
    • hasEntry

      boolean hasEntry(String entry)
      Checks if the team has an entry. For players, this should be their display name (username). For entities, this should be their UUID represented as a string.
      Parameters:
      entry - Entry to check.
      Returns:
      True if the team has the entry, false otherwise.
    • removeEntry

      void removeEntry(String entry)
      Removes an entry from the team. For players, this should be their display name (username). For entities, this should be their UUID represented as a string.
      Parameters:
      entry - Entry to remove.
    • getColor

      ChatColor getColor()
      Gets the color of the team.
      Returns:
      The color of the team.
    • getNameTagVisibility

      AbstractTeam.NameTags getNameTagVisibility()
      Gets the name tag visibility of the team.
      Returns:
      The name tag visibility of the team.
    • getCollisionRule

      AbstractTeam.CollisionRule getCollisionRule()
      Gets the collision rule of the team.
      Returns:
      The collision rule of the team.
    • setColor

      void setColor(ChatColor color)
      Sets the color of the team.
      Parameters:
      color - The color of the team.
    • setNameTagVisibility

      void setNameTagVisibility(AbstractTeam.NameTags visibility)
      Sets the name tag visibility of the team.
      Parameters:
      visibility - The name tag visibility of the team.
    • setCollisionRule

      void setCollisionRule(AbstractTeam.CollisionRule rule)
      Sets the collision rule of the team.
      Parameters:
      rule - The collision rule of the team.
    • getDelegate

      Object getDelegate()
      Gets the underlying delegate object. This may either be a Team or ScoreboardTeam
      Returns:
      The underlying delegate object.
    • getName

      String getName()
      Gets the name of the team.
      Returns:
      The name of the team.
    • sendToPlayer

      void sendToPlayer(Player player, AbstractTeam.SendMode mode)
      Sends the team to a player.
      Parameters:
      player - Player to send to.
      mode - Send mode.
    • getSize

      int getSize()
      Gets the number of entries in the team.
      Returns:
      The number of entries in the team.