Class ProxyQueryEvent
- java.lang.Object
-
- com.velocitypowered.api.event.connection.ProxyQueryEvent
-
public final class ProxyQueryEvent extends java.lang.Object
This event is fired if proxy is getting queried over GS4 Query protocol.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProxyQueryEvent.QueryType
Represents the type of query the client is asking for.
-
Constructor Summary
Constructors Constructor Description ProxyQueryEvent(ProxyQueryEvent.QueryType queryType, java.net.InetAddress querierAddress, QueryResponse response)
Creates a new event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.InetAddress
getQuerierAddress()
Get the address of the client that sent this query.ProxyQueryEvent.QueryType
getQueryType()
Returns the kind of query the remote client is performing.QueryResponse
getResponse()
Returns the current query response.void
setResponse(QueryResponse response)
Sets a new query response.java.lang.String
toString()
-
-
-
Constructor Detail
-
ProxyQueryEvent
public ProxyQueryEvent(ProxyQueryEvent.QueryType queryType, java.net.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 Detail
-
getQueryType
public ProxyQueryEvent.QueryType getQueryType()
Returns the kind of query the remote client is performing.- Returns:
- query type
-
getQuerierAddress
public java.net.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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-