Class ProxyQueryEvent
java.lang.Object
com.velocitypowered.api.event.query.ProxyQueryEvent
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the type of query the client is asking for. -
Constructor Summary
ConstructorsConstructorDescriptionProxyQueryEvent(ProxyQueryEvent.QueryType queryType, InetAddress querierAddress, QueryResponse response) Creates a new event. -
Method Summary
Modifier and TypeMethodDescriptionGet the address of the client that sent this query.Returns the kind of query the remote client is performing.Returns the current query response.voidsetResponse(QueryResponse response) Sets a new query response.toString()
-
Constructor Details
-
ProxyQueryEvent
public ProxyQueryEvent(ProxyQueryEvent.QueryType queryType, InetAddress querierAddress, QueryResponse response) Creates a new event.- Parameters:
queryType- the type of queryquerierAddress- the remote address for the queryresponse- the current query response
-
-
Method Details
-
getQueryType
Returns the kind of query the remote client is performing.- Returns:
- query type
-
getQuerierAddress
Get the address of the client that sent this query.- Returns:
- querier address
-
getResponse
Returns the current query response.- Returns:
- the current query response
-
setResponse
Sets a new query response.- Parameters:
response- the new non-null query response
-
toString
-