Interface TabListEntry
-
public interface TabListEntryRepresents the information attached to an entry in aTabList.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceTabListEntry.BuilderRepresents a builder class to create mutableTabListEntrys.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static TabListEntry.Builderbuilder()Creates a newTabListEntry.Builderto createTabListEntrys.Optional<Component>displayName()Gets this entry's display name.GameModegameMode()Gets theGameModethis entry is in.intlatency()Gets the latency for this entry.TabListlist()Gets theTabListthat owns this entry.GameProfileprofile()Gets theGameProfileassociated with this entry.TabListEntrysetDisplayName(@Nullable Component displayName)Sets this entry's display name.TabListEntrysetGameMode(GameMode gameMode)Sets this entry's gamemode.TabListEntrysetLatency(int latency)Sets the latency for this entry.
-
-
-
Method Detail
-
builder
static TabListEntry.Builder 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
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 theGameModethis entry is in.- Returns:
- The gamemode this entry is in
-
setGameMode
TabListEntry setGameMode(GameMode gameMode)
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
-
-