Interface TabListEntry
public interface TabListEntry
Represents the information attached to an entry in a
TabList
.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Represents a builder class to create mutableTabListEntry
s. -
Method Summary
Modifier and TypeMethodDescriptionstatic TabListEntry.Builder
builder()
Creates a newTabListEntry.Builder
to createTabListEntry
s.Gets this entry's display name.gameMode()
Gets theGameMode
this entry is in.int
latency()
Gets the latency for this entry.list()
Gets theTabList
that owns this entry.boolean
listed()
Gets whatever this entry is shown in the tab list.profile()
Gets theGameProfile
associated with this entry.setDisplayName
(@Nullable Component displayName) Sets this entry's display name.setGameMode
(GameMode gameMode) Sets this entry's gamemode.setLatency
(int latency) Sets the latency for this entry.setListed
(boolean listed) Sets whatever this entry is listed in the tab list.
-
Method Details
-
builder
Creates a newTabListEntry.Builder
to createTabListEntry
s.- Returns:
- The new builder
-
list
TabList list()Gets theTabList
that owns this entry.- Returns:
- The tab list that owns this entry
-
profile
GameProfile profile()Gets theGameProfile
associated with this entry.- Returns:
- The profile associated with this entry
-
displayName
Gets this entry's display name.- Returns:
- This entry's display name
-
setDisplayName
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
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 theGameMode
this entry is in.- Returns:
- The gamemode this entry is in
-
setGameMode
Sets this entry's gamemode.When using
GameModes.SPECTATOR
and this entry is of an onlinePlayer
, the player will have "spectator effects". Such effects can include invisibility and noclip.- Parameters:
gameMode
- The new gamemode- Returns:
- This entry, for chaining
-
listed
boolean listed()Gets whatever this entry is shown in the tab list. The entry is still sent to the client, however.- Returns:
- Whatever this entry is listed
-
setListed
Sets whatever this entry is listed in the tab list. The entry is still sent to the client, however.- Parameters:
listed
- Whatever to list this entry- Returns:
- This entry, for chaining
-