Interface TabList
-
public interface TabListRepresents the tab list of aPlayer.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidaddEntry(TabListEntry entry)Adds aTabListEntryto thePlayer's tab list.default TabListEntrybuildEntry(GameProfile profile, @Nullable Component displayName, int latency, int gameMode)Deprecated.Internal usage.default TabListEntrybuildEntry(GameProfile profile, @Nullable Component displayName, int latency, int gameMode, @Nullable IdentifiedKey key)Deprecated.Internal usage.default TabListEntrybuildEntry(GameProfile profile, @Nullable Component displayName, int latency, int gameMode, @Nullable ChatSession chatSession)Deprecated.Internal usage.TabListEntrybuildEntry(GameProfile profile, @Nullable Component displayName, int latency, int gameMode, @Nullable ChatSession chatSession, boolean listed)Deprecated.Internal usage.voidclearAll()Clears all entries from the tab list.voidclearHeaderAndFooter()Clears the tab list header and footer for the player.booleancontainsEntry(UUID uuid)Determines if the specified entry exists in the tab list.Collection<TabListEntry>getEntries()Returns an immutableCollectionof theTabListEntrys in the tab list.Optional<TabListEntry>getEntry(UUID uuid)Retrieves the tab list entry associated with the given uuid.Optional<TabListEntry>removeEntry(UUID uuid)voidsetHeaderAndFooter(Component header, Component footer)Deprecated.
-
-
-
Method Detail
-
setHeaderAndFooter
@Deprecated void setHeaderAndFooter(Component header, Component footer)
Deprecated.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 aTabListEntryto thePlayer's tab list.- Parameters:
entry- to add to the tab list
-
removeEntry
Optional<TabListEntry> removeEntry(UUID uuid)
- Parameters:
uuid- of the entry- Returns:
Optionalcontaining the removedTabListEntryif present, otherwiseOptional.empty()
-
containsEntry
boolean containsEntry(UUID uuid)
Determines if the specified entry exists in the tab list.- Parameters:
uuid- the UUID of the entry- Returns:
trueif it exists,falseif it does not
-
getEntry
Optional<TabListEntry> getEntry(UUID uuid)
Retrieves the tab list entry associated with the given uuid.- Parameters:
uuid- The player'sUUIDtheTabListEntryis in reference to.- Returns:
Optional.empty()if the player is not present in the provided player'sTabListotherwise a presentTabListEntryin relation to the player.
-
getEntries
Collection<TabListEntry> getEntries()
Returns an immutableCollectionof theTabListEntrys in the tab list.- Returns:
- immutable
Collectionof tab list entries
-
clearAll
void clearAll()
Clears all entries from the tab list.
-
buildEntry
@Deprecated default TabListEntry buildEntry(GameProfile profile, @Nullable Component displayName, int latency, int gameMode)
Deprecated.Internal usage. UseTabListEntry.Builderinstead.Builds a tab list entry.- Parameters:
profile- profiledisplayName- display namelatency- latencygameMode- game mode- Returns:
- entry
-
buildEntry
@Deprecated default TabListEntry buildEntry(GameProfile profile, @Nullable Component displayName, int latency, int gameMode, @Nullable IdentifiedKey key)
Deprecated.Internal usage. UseTabListEntry.Builderinstead.Builds a tab list entry.- Parameters:
profile- profiledisplayName- display namelatency- latencygameMode- game modekey- the player key- Returns:
- entry
-
buildEntry
@Deprecated default TabListEntry buildEntry(GameProfile profile, @Nullable Component displayName, int latency, int gameMode, @Nullable ChatSession chatSession)
Deprecated.Internal usage. UseTabListEntry.Builderinstead.Represents an entry in aPlayer's tab list.- Parameters:
profile- the profiledisplayName- the display namelatency- the latencygameMode- the game modechatSession- the chat session- Returns:
- the entry
-
buildEntry
@Deprecated TabListEntry buildEntry(GameProfile profile, @Nullable Component displayName, int latency, int gameMode, @Nullable ChatSession chatSession, boolean listed)
Deprecated.Internal usage. UseTabListEntry.Builderinstead.Represents an entry in aPlayer's tab list.- Parameters:
profile- the profiledisplayName- the display namelatency- the latencygameMode- the game modechatSession- the chat sessionlisted- the visible status of entry- Returns:
- the entry
-
-