Class TeamPlayerSetComponent

java.lang.Object
com.booksaw.betterTeams.team.SetTeamComponent<TeamPlayer>
com.booksaw.betterTeams.team.TeamPlayerSetComponent
All Implemented Interfaces:
TeamComponent<Set<TeamPlayer>>
Direct Known Subclasses:
MemberSetComponent

public abstract class TeamPlayerSetComponent extends SetTeamComponent<TeamPlayer>
  • Constructor Details

    • TeamPlayerSetComponent

      public TeamPlayerSetComponent()
  • Method Details

    • getOnlinePlayers

      public List<org.bukkit.entity.Player> getOnlinePlayers()
      Returns:
      A list of players which are currently online and on this team
    • getOfflinePlayers

      public List<org.bukkit.OfflinePlayer> getOfflinePlayers()
      Returns:
      A list of players which are currently online on this team
    • getOnlineTeamPlayers

      public List<TeamPlayer> getOnlineTeamPlayers()
      Returns:
      A list of all teamPlayers which are currently online
    • getTeamPlayer

      @Nullable public @Nullable TeamPlayer getTeamPlayer(@NotNull @NotNull org.bukkit.OfflinePlayer p)
      Used to get the team player instance of that offline player
      Parameters:
      p - The player to get the team player for
      Returns:
      The team player instance, or null if not found
    • getRank

      public List<TeamPlayer> getRank(PlayerRank rank)
      Get all team players with the specified rank
      Parameters:
      rank - The rank to filter by
      Returns:
      List of team players with the specified rank
    • broadcastMessage

      public void broadcastMessage(@NotNull @NotNull Message message)
      Sends the specified message to all team players stored in the list
      Parameters:
      message - The message to send to all online players
    • broadcastTitle

      public void broadcastTitle(@NotNull @NotNull Message message)
      Sends the specified title to all team players stored in the list
      Parameters:
      message - The message to send to all online players
    • fromString

      public TeamPlayer fromString(String str)
      Description copied from class: SetTeamComponent
      Used to convert a string into the correct component for this type
      Specified by:
      fromString in class SetTeamComponent<TeamPlayer>
      Parameters:
      str - The string to convert
      Returns:
      The value to be added to the list
    • toString

      public String toString(@NotNull @NotNull TeamPlayer component)
      Description copied from class: SetTeamComponent
      Used to convert a component of the list to a string for saving
      Specified by:
      toString in class SetTeamComponent<TeamPlayer>
      Parameters:
      component - The component to convert
      Returns:
      The converted component
    • contains

      public boolean contains(@NotNull @NotNull TeamPlayer component)
      Description copied from class: SetTeamComponent
      Used to check if the component provided is stored within this component
      Overrides:
      contains in class SetTeamComponent<TeamPlayer>
      Parameters:
      component - The component to check
      Returns:
      If the component is within this component list
    • contains

      public boolean contains(org.bukkit.OfflinePlayer player)
      Checks if the given player is in this team
      Parameters:
      player - The player to check for
      Returns:
      true if the player is in this team, false otherwise
    • getOnlinePlayersString

      public String getOnlinePlayersString()
      Returns:
      A comma-separated string of all online player names
    • getOfflinePlayersString

      public String getOfflinePlayersString()
      Returns:
      A comma-separated string of all offline player names