Class ProxyQueryEventImpl
- java.lang.Object
-
- com.velocitypowered.api.event.connection.ProxyQueryEventImpl
-
- All Implemented Interfaces:
ProxyQueryEvent,Event
public final class ProxyQueryEventImpl extends Object implements ProxyQueryEvent
This event is fired if proxy is getting queried over GS4 Query protocol.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.velocitypowered.api.event.connection.ProxyQueryEvent
ProxyQueryEvent.QueryType
-
-
Constructor Summary
Constructors Constructor Description ProxyQueryEventImpl(ProxyQueryEvent.QueryType queryType, InetAddress querierAddress, QueryResponse response)Creates a new event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InetAddressqueryingAddress()Get the address of the client that sent this query.QueryResponseresponse()Returns the current query response.voidsetResponse(QueryResponse response)Sets a new query response.StringtoString()ProxyQueryEvent.QueryTypetype()Returns the kind of query the remote client is performing.
-
-
-
Constructor Detail
-
ProxyQueryEventImpl
public ProxyQueryEventImpl(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 Detail
-
type
public ProxyQueryEvent.QueryType type()
Returns the kind of query the remote client is performing.- Specified by:
typein interfaceProxyQueryEvent- Returns:
- query type
-
queryingAddress
public InetAddress queryingAddress()
Get the address of the client that sent this query.- Specified by:
queryingAddressin interfaceProxyQueryEvent- Returns:
- querier address
-
response
public QueryResponse response()
Returns the current query response.- Specified by:
responsein interfaceProxyQueryEvent- Returns:
- the current query response
-
setResponse
public void setResponse(QueryResponse response)
Sets a new query response.- Specified by:
setResponsein interfaceProxyQueryEvent- Parameters:
response- the new non-null query response
-
-