Interface TabList


public interface TabList
Represents the tab list of a Player.
  • Method Details

    • setHeaderAndFooter

      @Deprecated void setHeaderAndFooter(Component header, Component footer)
      Sets the tab list header and footer for the player.
      Parameters:
      header - the header component
      footer - the footer component
    • clearHeaderAndFooter

      void clearHeaderAndFooter()
      Clears the tab list header and footer for the player.
    • addEntry

      void addEntry(TabListEntry entry)
      Adds a TabListEntry to the Player's tab list.
      Parameters:
      entry - to add to the tab list
    • addEntries

      default void addEntries(Iterable<TabListEntry> entries)
      Adds a Iterable of TabListEntry's to the Player's tab list.
      Parameters:
      entries - to add to the tab list
    • addEntries

      default void addEntries(TabListEntry... entries)
      Adds an array of TabListEntry's to the Player's tab list.
      Parameters:
      entries - to add to the tab list
    • removeEntry

      Optional<TabListEntry> removeEntry(UUID uuid)
      Removes the TabListEntry from the tab list with the GameProfile identified with the specified UUID.
      Parameters:
      uuid - of the entry
      Returns:
      Optional containing the removed TabListEntry if present, otherwise Optional.empty()
    • containsEntry

      boolean containsEntry(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
    • getEntry

      Optional<TabListEntry> getEntry(UUID uuid)
      Retrieves the tab list entry associated with the given uuid.
      Parameters:
      uuid - The player's UUID the TabListEntry is in reference to.
      Returns:
      Optional.empty() if the player is not present in the provided player's TabList otherwise a present TabListEntry in relation to the player.
    • getEntries

      Collection<TabListEntry> getEntries()
      Returns an immutable Collection of the TabListEntrys in the tab list.
      Returns:
      immutable Collection of 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. Use TabListEntry.Builder instead.
      Builds a tab list entry.
      Parameters:
      profile - profile
      displayName - display name
      latency - latency
      gameMode - game mode
      Returns:
      entry
    • buildEntry

      @Deprecated default TabListEntry buildEntry(GameProfile profile, @Nullable Component displayName, int latency, int gameMode, @Nullable IdentifiedKey key)
      Deprecated.
      Internal usage. Use TabListEntry.Builder instead.
      Builds a tab list entry.
      Parameters:
      profile - profile
      displayName - display name
      latency - latency
      gameMode - game mode
      key - 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. Use TabListEntry.Builder instead.
      Represents an entry in a Player's tab list.
      Parameters:
      profile - the profile
      displayName - the display name
      latency - the latency
      gameMode - the game mode
      chatSession - the chat session
      Returns:
      the entry
    • buildEntry

      @Deprecated default TabListEntry buildEntry(GameProfile profile, @Nullable Component displayName, int latency, int gameMode, @Nullable ChatSession chatSession, boolean listed)
      Deprecated.
      Internal usage. Use TabListEntry.Builder instead.
      Represents an entry in a Player's tab list.
      Parameters:
      profile - the profile
      displayName - the display name
      latency - the latency
      gameMode - the game mode
      chatSession - the chat session
      listed - the visible status of entry
      Returns:
      the entry
    • buildEntry

      @Deprecated TabListEntry buildEntry(GameProfile profile, @Nullable Component displayName, int latency, int gameMode, @Nullable ChatSession chatSession, boolean listed, int listOrder)
      Deprecated.
      Internal usage. Use TabListEntry.Builder instead.
      Represents an entry in a Player's tab list.
      Parameters:
      profile - the profile
      displayName - the display name
      latency - the latency
      gameMode - the game mode
      chatSession - the chat session
      listed - the visible status of entry
      listOrder - the order/priority of entry in the tab list
      Returns:
      the entry