public interface TabList
Player
's tab list.Modifier and Type | Method and Description |
---|---|
TabList |
addEntry(TabListEntry entry)
Adds an entry to the list.
|
Collection<TabListEntry> |
getEntries()
Gets the entries on the list.
|
Optional<TabListEntry> |
getEntry(UUID uniqueId)
Gets a
TabListEntry matching the specified unique id. |
Optional<Text> |
getFooter()
Gets this list's footer.
|
Optional<Text> |
getHeader()
Gets this list's header.
|
Player |
getPlayer()
|
Optional<TabListEntry> |
removeEntry(UUID uniqueId)
Removes an entry from the list.
|
TabList |
setFooter(Text footer)
Sets this list's footer.
|
TabList |
setHeader(Text header)
Sets this list's header.
|
default TabList |
setHeaderAndFooter(Text header,
Text footer)
Sets this list's header and footer.
|
Player getPlayer()
TabList setHeader(@Nullable Text header)
When null
is passed, an empty Text
will
be sent.
header
- The new headerTabList setFooter(@Nullable Text footer)
When null
is passed, an empty Text
will
be sent.
footer
- The new footerdefault TabList setHeaderAndFooter(@Nullable Text header, @Nullable Text footer)
When null
is passed, an empty Text
will
be sent.
header
- The new headerfooter
- The new footerCollection<TabListEntry> getEntries()
The returned collection should be immutable.
Optional<TabListEntry> getEntry(UUID uniqueId)
TabListEntry
matching the specified unique id.uniqueId
- The unique id to search forOptional.empty()
TabList addEntry(TabListEntry entry) throws IllegalArgumentException
entry
- The entry to addIllegalArgumentException
- if an entry already with the same unique
id exists on the listIllegalStateException
- if the provided entry was notOptional<TabListEntry> removeEntry(UUID uniqueId)
Note that if this is used on a player, but they remain visible in-game, their skin will not work.
uniqueId
- The unique id of the entry to remove