public interface TabListEntry
TabList
.Modifier and Type | Interface and Description |
---|---|
static class |
TabListEntry.Builder
Represents a builder which creates
TabListEntry s. |
Modifier and Type | Method and Description |
---|---|
static TabListEntry.Builder |
builder()
Returns a
TabListEntry.Builder to create a TabListEntry . |
Optional<Component> |
getDisplayName()
Returns
Optional text Component , which if present is the text displayed for
this entry in the TabList , otherwise GameProfile.getName() is shown. |
int |
getGameMode()
Gets the game mode
this entry has been set to. |
int |
getLatency()
Returns the latency for
this entry. |
GameProfile |
getProfile()
Returns the
GameProfile of the entry, which uniquely identifies the entry with the
containing UUID , as well as deciding what is shown as the player head in the
tab list. |
TabList |
getTabList()
|
TabListEntry |
setDisplayName(@Nullable Component displayName)
|
TabListEntry |
setGameMode(int gameMode)
Sets the game mode for
this entry to the specified value. |
TabListEntry |
setLatency(int latency)
Sets the latency for
this entry to the specified value. |
GameProfile getProfile()
GameProfile
of the entry, which uniquely identifies the entry with the
containing UUID
, as well as deciding what is shown as the player head in the
tab list.GameProfile
of the entryOptional<Component> getDisplayName()
Optional
text Component
, which if present is the text displayed for
this
entry in the TabList
, otherwise GameProfile.getName()
is shown.TabListEntry setDisplayName(@Nullable Component displayName)
Component
to be displayed for this
TabListEntry
. If
null
, GameProfile.getName()
will be shown.displayName
- to show in the TabList
for this
entrythis
, for chainingint getLatency()
this
entry.
The icon shown in the tab list is calculated by the latency as follows:
this
entryTabListEntry setLatency(int latency)
this
entry to the specified value.latency
- to changed tothis
, for chaininggetLatency()
int getGameMode()
this
entry has been set to.
The number corresponds to the game mode in the following way:
TabListEntry setGameMode(int gameMode)
this
entry to the specified value.gameMode
- to change tothis
, for chaininggetGameMode()
static TabListEntry.Builder builder()
TabListEntry.Builder
to create a TabListEntry
.TabListEntry
builder