Interface TabList
-
public interface TabList
Represents the tab list of aPlayer
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addEntry(TabListEntry entry)
Adds aTabListEntry
to thePlayer
's tab list.TabListEntry
buildEntry(GameProfile profile, @Nullable net.kyori.adventure.text.Component displayName, int latency, int gameMode)
Deprecated.Internal usage.void
clearHeaderAndFooter()
Clears the tab list header and footer for the player.boolean
containsEntry(java.util.UUID uuid)
Determines if the specified entry exists in the tab list.java.util.Collection<TabListEntry>
getEntries()
Returns an immutableCollection
of theTabListEntry
s in the tab list.java.util.Optional<TabListEntry>
removeEntry(java.util.UUID uuid)
void
setHeaderAndFooter(net.kyori.adventure.text.Component header, net.kyori.adventure.text.Component footer)
Sets the tab list header and footer for the player.
-
-
-
Method Detail
-
setHeaderAndFooter
void setHeaderAndFooter(net.kyori.adventure.text.Component header, net.kyori.adventure.text.Component footer)
Sets the tab list header and footer for the player.- Parameters:
header
- the header componentfooter
- the footer component
-
clearHeaderAndFooter
void clearHeaderAndFooter()
Clears the tab list header and footer for the player.
-
addEntry
void addEntry(TabListEntry entry)
Adds aTabListEntry
to thePlayer
's tab list.- Parameters:
entry
- to add to the tab list
-
removeEntry
java.util.Optional<TabListEntry> removeEntry(java.util.UUID uuid)
- Parameters:
uuid
- of the entry- Returns:
Optional
containing the removedTabListEntry
if present, otherwiseOptional.empty()
-
containsEntry
boolean containsEntry(java.util.UUID uuid)
Determines if the specified entry exists in the tab list.- Parameters:
uuid
- the UUID of the entry- Returns:
true
if it exists,false
if it does not
-
getEntries
java.util.Collection<TabListEntry> getEntries()
Returns an immutableCollection
of theTabListEntry
s in the tab list.- Returns:
- immutable
Collection
of tab list entries
-
buildEntry
@Deprecated TabListEntry buildEntry(GameProfile profile, @Nullable net.kyori.adventure.text.Component displayName, int latency, int gameMode)
Deprecated.Internal usage. UseTabListEntry.Builder
instead.Builds a tab list entry.- Parameters:
profile
- profiledisplayName
- display namelatency
- latencygameMode
- game mode- Returns:
- entry
-
-