Interface TabListEntry
-
public interface TabListEntry
Represents the information attached to an entry in aTabList
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
TabListEntry.Builder
Represents a builder class to create mutableTabListEntry
s.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static TabListEntry.Builder
builder()
Creates a newTabListEntry.Builder
to createTabListEntry
s.Optional<Component>
displayName()
Gets this entry's display name.GameMode
gameMode()
Gets theGameMode
this entry is in.int
latency()
Gets the latency for this entry.TabList
list()
Gets theTabList
that owns this entry.GameProfile
profile()
Gets theGameProfile
associated with this entry.TabListEntry
setDisplayName(@Nullable Component displayName)
Sets this entry's display name.TabListEntry
setGameMode(GameMode gameMode)
Sets this entry's gamemode.TabListEntry
setLatency(int latency)
Sets the latency for this entry.
-
-
-
Method Detail
-
builder
static TabListEntry.Builder 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
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 theGameMode
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 onlinePlayer
, the player will have "spectator effects". Such effects can include invisibility and noclip.- Parameters:
gameMode
- The new gamemode- Returns:
- This entry, for chaining
-
-