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 createsTabListEntrys.- See Also:
TabListEntry
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TabListEntrybuild()TabListEntry.BuilderchatSession(ChatSession chatSession)Sets theIdentifiedKeyof theTabListEntry.TabListEntry.BuilderdisplayName(@Nullable Component displayName)Sets the displayed name of theTabListEntry.TabListEntry.BuildergameMode(int gameMode)Sets the game mode of theTabListEntry.TabListEntry.Builderlatency(int latency)Sets the latency of theTabListEntry.TabListEntry.Builderlisted(boolean listed)Sets wether this entry should be visible.TabListEntry.Builderprofile(GameProfile profile)Sets theGameProfileof theTabListEntry.TabListEntry.BuildertabList(TabList tabList)
-
-
-
Method Detail
-
tabList
public TabListEntry.Builder tabList(TabList tabList)
Sets the parentTabListfor 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 theGameProfileof theTabListEntry.- Parameters:
profile- to set- Returns:
this, for chaining- See Also:
TabListEntry.getProfile()
-
chatSession
public TabListEntry.Builder chatSession(ChatSession chatSession)
Sets theIdentifiedKeyof theTabListEntry.This only works for players currently not connected to this proxy.
For any player currently connected to this proxy this will be filled automatically.
Will ignore mismatching key revisions data.
- Parameters:
chatSession- session to set- Returns:
this, for chaining- See Also:
TabListEntry.getChatSession()
-
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()
-
listed
public TabListEntry.Builder listed(boolean listed)
Sets wether this entry should be visible.- Parameters:
listed- to set- Returns:
- ${code this}, for chaining
- See Also:
TabListEntry.isListed()
-
build
public TabListEntry build()
- Returns:
- the constructed
TabListEntry
-
-