public interface TabList
Player
's tab list.Modifier and Type | Method and Description |
---|---|
void |
addPlayer(PlayerTabInfo player)
Adds a player to the list.
|
Text |
getFooter()
Gets this list's footer.
|
Text |
getHeader()
Gets this list's header.
|
Optional<PlayerTabInfo> |
getPlayer(UUID uuid)
Finds a
PlayerTabInfo matching the specified UUID. |
List<PlayerTabInfo> |
getPlayers()
Gets the players on the list.
|
PlayerTabInfo |
removePlayer(UUID playerId)
Removes a player from the list.
|
void |
setFooter(Text footer)
Sets this list's footer.
|
void |
setHeader(Text header)
Sets this list's header.
|
Text getHeader()
void setHeader(Text header)
header
- The new headerText getFooter()
void setFooter(Text footer)
footer
- The new footerList<PlayerTabInfo> getPlayers()
void addPlayer(PlayerTabInfo player) throws IllegalArgumentException
player
- The player to addIllegalArgumentException
- when it attempts to add a player already
on the list. This is to prevent modification of a
PlayerTabInfo
by overwriting itPlayerTabInfo removePlayer(UUID playerId)
playerId
- the UUID of the player to removePlayerTabInfo
that was associated with the UUIDOptional<PlayerTabInfo> getPlayer(UUID uuid)
PlayerTabInfo
matching the specified UUID. If none were
found, it returns Optional.empty().uuid
- The UUID to search for