Class PingOptions
- java.lang.Object
-
- com.velocitypowered.api.proxy.server.PingOptions
-
public final class PingOptions extends Object
Contains the parameters used to ping aRegisteredServer. This class is immutable.- Since:
- 3.2.0
- See Also:
RegisteredServer.ping(PingOptions)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPingOptions.BuilderA builder forPingOptionsobjects.
-
Field Summary
Fields Modifier and Type Field Description static PingOptionsDEFAULTDefault PingOptions.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PingOptions.Builderbuilder()Create a new builder to assign values to a new PingOptions.booleanequals(Object o)ProtocolVersiongetProtocolVersion()The protocol version used to ping the server.longgetTimeout()The maximum period of time to wait for a response from the remote server.inthashCode()StringtoString()
-
-
-
Field Detail
-
DEFAULT
public static final PingOptions DEFAULT
Default PingOptions.
-
-
Method Detail
-
getProtocolVersion
public ProtocolVersion getProtocolVersion()
The protocol version used to ping the server.- Returns:
- the emulated Minecraft version
-
getTimeout
public long getTimeout()
The maximum period of time to wait for a response from the remote server.- Returns:
- the server ping timeout in milliseconds
-
builder
public static PingOptions.Builder builder()
Create a new builder to assign values to a new PingOptions.- Returns:
- a new
PingOptions.Builder
-
-