Interface TabList
public interface TabList
Represents the tab list of a
Player
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
addEntry
(TabListEntry entry) Adds aTabListEntry
to thePlayer
's tab list.buildEntry
(GameProfile profile, @Nullable Component displayName, int latency, int gameMode) Deprecated.Internal usage.void
Clears the tab list header and footer for the player.boolean
containsEntry
(UUID uuid) Determines if the specified entry exists in the tab list.Returns an immutableCollection
of theTabListEntry
s in the tab list.removeEntry
(UUID uuid) void
setHeaderAndFooter
(Component header, Component footer) Deprecated.
-
Method Details
-
addEntry
Adds aTabListEntry
to thePlayer
's tab list.- Parameters:
entry
- to add to the tab list
-
removeEntry
- Parameters:
uuid
- of the entry- Returns:
Optional
containing the removedTabListEntry
if present, otherwiseOptional.empty()
-
containsEntry
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
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 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