Class ServerPing.Builder
- java.lang.Object
-
- com.velocitypowered.api.proxy.server.ServerPing.Builder
-
- Enclosing class:
- ServerPing
public static final class ServerPing.Builder extends Object
A builder forServerPing
objects.
-
-
Method Summary
-
-
-
Method Detail
-
version
public ServerPing.Builder version(ServerPing.Version version)
-
onlinePlayers
public ServerPing.Builder onlinePlayers(int onlinePlayers)
-
maximumPlayers
public ServerPing.Builder maximumPlayers(int maximumPlayers)
-
samplePlayers
public ServerPing.Builder samplePlayers(ServerPing.SamplePlayer... players)
-
modType
public ServerPing.Builder modType(String modType)
-
mods
public ServerPing.Builder mods(ModInfo.Mod... mods)
-
mods
public ServerPing.Builder mods(ModInfo mods)
Uses the modifiedmods
list in the response.- Parameters:
mods
- the mods list to use- Returns:
- this build, for chaining
-
clearMods
public ServerPing.Builder clearMods()
-
clearSamplePlayers
public ServerPing.Builder clearSamplePlayers()
-
notModCompatible
public ServerPing.Builder notModCompatible()
-
nullPlayers
public ServerPing.Builder nullPlayers()
-
description
@Deprecated public ServerPing.Builder description(net.kyori.text.Component description)
Deprecated.
-
description
public ServerPing.Builder description(Component description)
-
favicon
public ServerPing.Builder favicon(Favicon favicon)
-
clearFavicon
public ServerPing.Builder clearFavicon()
-
build
public ServerPing build()
Uses the information from this builder to create a newServerPing
instance. The builder can be re-used after this event has been called.- Returns:
- a new
ServerPing
instance
-
getVersion
public ServerPing.Version getVersion()
-
getOnlinePlayers
public int getOnlinePlayers()
-
getMaximumPlayers
public int getMaximumPlayers()
-
getSamplePlayers
public List<ServerPing.SamplePlayer> getSamplePlayers()
-
getDescription
@Deprecated public Optional<net.kyori.text.Component> getDescription()
Deprecated.
-
getModType
public String getModType()
-
getMods
public List<ModInfo.Mod> getMods()
-
-