Interface TabList


  • public interface TabList
    Represents a Player's tab list.
    • Method Detail

      • header

        Optional<Component> header()
        Gets this list's header.
        Returns:
        The current header
      • setHeader

        TabList setHeader​(@Nullable Component header)
        Sets this list's header.

        When null is passed, an empty Component will be sent.

        Parameters:
        header - The new header
        Returns:
        This tab list, for chaining
      • footer

        Optional<Component> footer()
        Gets this list's footer.
        Returns:
        The current footer
      • setFooter

        TabList setFooter​(@Nullable Component footer)
        Sets this list's footer.

        When null is passed, an empty Component will be sent.

        Parameters:
        footer - The new footer
        Returns:
        This tab list, for chaining
      • setHeaderAndFooter

        default TabList setHeaderAndFooter​(@Nullable Component header,
                                           @Nullable Component footer)
        Sets this list's header and footer.

        When null is passed, an empty Component will be sent.

        Parameters:
        header - The new header
        footer - The new footer
        Returns:
        This tab list, for chaining
      • entries

        Collection<TabListEntry> entries()
        Gets the entries on the list.

        The returned collection should be immutable.

        Returns:
        The entries on the list
      • removeEntry

        Optional<TabListEntry> removeEntry​(UUID uniqueId)
        Removes an entry from the list.

        Note that if this is used on a player, but they remain visible in-game, their skin will not work.

        Parameters:
        uniqueId - The unique id of the entry to remove
        Returns:
        The entry that was associated with the unique id