Interface TabListEntry


  • public interface TabListEntry
    Represents the information attached to an entry in a TabList.
    • Method Detail

      • list

        TabList list()
        Gets the TabList that owns this entry.
        Returns:
        The tab list that owns this entry
      • profile

        GameProfile profile()
        Gets the GameProfile associated with this entry.
        Returns:
        The profile associated with this entry
      • displayName

        Optional<Component> displayName()
        Gets this entry's display name.
        Returns:
        This entry's display name
      • setDisplayName

        TabListEntry setDisplayName​(@Nullable Component displayName)
        Sets this entry's display name.
        Parameters:
        displayName - The new display name
        Returns:
        This entry, for chaining
      • latency

        int latency()
        Gets the latency for this entry.
        Returns:
        The latency for this entry
      • setLatency

        TabListEntry setLatency​(int latency)
        Sets the latency for this entry.

        The client displays connection bars based on this number.

        Connection Bars
        Bars Time
        0 Less than 0
        1 1000+
        2 600 - 999
        3 300 - 599
        4 150 - 299
        5 0 - 149
        Parameters:
        latency - The new latency, in milliseconds
        Returns:
        This entry, for chaining
      • gameMode

        GameMode gameMode()
        Gets the GameMode this entry is in.
        Returns:
        The gamemode this entry is in
      • setGameMode

        TabListEntry setGameMode​(GameMode gameMode)
        Sets this entry's gamemode.

        When using GameModes.SPECTATOR and this entry is of an online Player, the player will have "spectator effects". Such effects can include invisibility and noclip.

        Parameters:
        gameMode - The new gamemode
        Returns:
        This entry, for chaining