Package com.booksaw.betterTeams.team
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
-
Field Summary
Fields inherited from class com.booksaw.betterTeams.team.SetTeamComponent
set -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbroadcastMessage(@NotNull Message message) Sends the specified message to all team players stored in the listvoidbroadcastTitle(@NotNull Message message) Sends the specified title to all team players stored in the listbooleancontains(@NotNull TeamPlayer component) Used to check if the component provided is stored within this componentbooleancontains(org.bukkit.OfflinePlayer player) Checks if the given player is in this teamfromString(String str) Used to convert a string into the correct component for this typeList<org.bukkit.OfflinePlayer> List<org.bukkit.entity.Player> getRank(PlayerRank rank) Get all team players with the specified rank@Nullable TeamPlayergetTeamPlayer(@NotNull org.bukkit.OfflinePlayer p) Used to get the team player instance of that offline playertoString(@NotNull TeamPlayer component) Used to convert a component of the list to a string for savingMethods inherited from class com.booksaw.betterTeams.team.SetTeamComponent
add, clear, get, getClone, getConvertedList, getSectionHeading, isEmpty, load, remove, set, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.booksaw.betterTeams.team.TeamComponent
load, save
-
Constructor Details
-
TeamPlayerSetComponent
public TeamPlayerSetComponent()
-
-
Method Details
-
getOnlinePlayers
- Returns:
- A list of players which are currently online and on this team
-
getOfflinePlayers
- Returns:
- A list of players which are currently online on this team
-
getOnlineTeamPlayers
- Returns:
- A list of all teamPlayers which are currently online
-
getTeamPlayer
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
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
Sends the specified message to all team players stored in the list- Parameters:
message- The message to send to all online players
-
broadcastTitle
Sends the specified title to all team players stored in the list- Parameters:
message- The message to send to all online players
-
fromString
Description copied from class:SetTeamComponentUsed to convert a string into the correct component for this type- Specified by:
fromStringin classSetTeamComponent<TeamPlayer>- Parameters:
str- The string to convert- Returns:
- The value to be added to the list
-
toString
Description copied from class:SetTeamComponentUsed to convert a component of the list to a string for saving- Specified by:
toStringin classSetTeamComponent<TeamPlayer>- Parameters:
component- The component to convert- Returns:
- The converted component
-
contains
Description copied from class:SetTeamComponentUsed to check if the component provided is stored within this component- Overrides:
containsin classSetTeamComponent<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
- Returns:
- A comma-separated string of all online player names
-
getOfflinePlayersString
- Returns:
- A comma-separated string of all offline player names
-