Interface TabListEntry
public interface TabListEntry
Represents the information attached to an entry in a
TabList.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents a builder class to create mutableTabListEntrys. -
Method Summary
Modifier and TypeMethodDescriptionstatic TabListEntry.Builderbuilder()Creates a newTabListEntry.Builderto createTabListEntrys.Gets this entry's display name.gameMode()Gets theGameModethis entry is in.intlatency()Gets the latency for this entry.list()Gets theTabListthat owns this entry.booleanlisted()Gets whatever this entry is shown in the tab list.profile()Gets theGameProfileassociated 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.Builderto createTabListEntrys.- Returns:
- The new builder
-
list
TabList list()Gets theTabListthat owns this entry.- Returns:
- The tab list that owns this entry
-
profile
GameProfile profile()Gets theGameProfileassociated 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 theGameModethis entry is in.- Returns:
- The gamemode this entry is in
-
setGameMode
Sets this entry's gamemode.When using
GameModes.SPECTATORand 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
-