Class ProxyQueryEvent

java.lang.Object
com.velocitypowered.api.event.query.ProxyQueryEvent

public final class ProxyQueryEvent extends Object
This event is fired if proxy is getting queried over GS4 Query protocol. Velocity will wait on this event to fire before providing a response to the client.
  • Constructor Details

    • ProxyQueryEvent

      public ProxyQueryEvent(ProxyQueryEvent.QueryType queryType, InetAddress querierAddress, QueryResponse response)
      Creates a new event.
      Parameters:
      queryType - the type of query
      querierAddress - the remote address for the query
      response - the current query response
  • Method Details

    • getQueryType

      public ProxyQueryEvent.QueryType getQueryType()
      Returns the kind of query the remote client is performing.
      Returns:
      query type
    • getQuerierAddress

      public InetAddress getQuerierAddress()
      Get the address of the client that sent this query.
      Returns:
      querier address
    • getResponse

      public QueryResponse getResponse()
      Returns the current query response.
      Returns:
      the current query response
    • setResponse

      public void setResponse(QueryResponse response)
      Sets a new query response.
      Parameters:
      response - the new non-null query response
    • toString

      public String toString()
      Overrides:
      toString in class Object