Class PingOptions

java.lang.Object
com.velocitypowered.api.proxy.server.PingOptions

public final class PingOptions extends Object
Contains the parameters used to ping a RegisteredServer. This class is immutable.
Since:
3.2.0
See Also:
  • Field Details

    • DEFAULT

      public static final PingOptions DEFAULT
      Default PingOptions.
  • Method Details

    • 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
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object