Class TabListEntry.Builder
- java.lang.Object
-
- com.velocitypowered.api.proxy.player.TabListEntry.Builder
-
- Enclosing interface:
- TabListEntry
public static class TabListEntry.Builder extends Object
Represents a builder which createsTabListEntry
s.- See Also:
TabListEntry
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TabListEntry
build()
TabListEntry.Builder
displayName(@Nullable Component displayName)
Sets the displayed name of theTabListEntry
.TabListEntry.Builder
displayName(net.kyori.text.Component displayName)
Deprecated.UsedisplayName(Component)
insteadTabListEntry.Builder
gameMode(int gameMode)
Sets the game mode of theTabListEntry
.TabListEntry.Builder
latency(int latency)
Sets the latency of theTabListEntry
.TabListEntry.Builder
profile(GameProfile profile)
Sets theGameProfile
of theTabListEntry
.TabListEntry.Builder
tabList(TabList tabList)
-
-
-
Method Detail
-
tabList
public TabListEntry.Builder tabList(TabList tabList)
Sets the parentTabList
for this entry, the entry will only be able to be added to that specificTabList
.- Parameters:
tabList
- to set- Returns:
this
, for chaining
-
profile
public TabListEntry.Builder profile(GameProfile profile)
Sets theGameProfile
of theTabListEntry
.- Parameters:
profile
- to set- Returns:
this
, for chaining- See Also:
TabListEntry.getProfile()
-
displayName
@Deprecated public TabListEntry.Builder displayName(net.kyori.text.Component displayName)
Deprecated.UsedisplayName(Component)
insteadSets the displayed name of theTabListEntry
.- Parameters:
displayName
- to set- Returns:
this
, for chaining- See Also:
TabListEntry.getDisplayName()
-
displayName
public TabListEntry.Builder displayName(@Nullable Component displayName)
Sets the displayed name of theTabListEntry
.- Parameters:
displayName
- to set- Returns:
this
, for chaining- See Also:
()
-
latency
public TabListEntry.Builder latency(int latency)
Sets the latency of theTabListEntry
.- Parameters:
latency
- to set- Returns:
this
, for chaining- See Also:
TabListEntry.getLatency()
-
gameMode
public TabListEntry.Builder gameMode(int gameMode)
Sets the game mode of theTabListEntry
.- Parameters:
gameMode
- to set- Returns:
this
, for chaining- See Also:
TabListEntry.getGameMode()
-
build
public TabListEntry build()
- Returns:
- the constructed
TabListEntry
-
-