Class ConnectionHandshakeEvent
java.lang.Object
com.velocitypowered.api.event.connection.ConnectionHandshakeEvent
This event is fired when a handshake is established between a client and the proxy.
Velocity will fire this event asynchronously and will not wait for it to complete before
handling the connection.
-
Constructor Summary
ConstructorsConstructorDescriptionConnectionHandshakeEvent(InboundConnection connection) Deprecated, for removal: This API element is subject to removal in a future version.ConnectionHandshakeEvent(InboundConnection connection, HandshakeIntent intent) Constructs a newConnectionHandshakeEvent. -
Method Summary
Modifier and TypeMethodDescriptionReturns the inbound connection associated with this handshake.Returns theHandshakeIntentassociated with this connection handshake.toString()
-
Constructor Details
-
ConnectionHandshakeEvent
Constructs a newConnectionHandshakeEvent.- Parameters:
connection- the inbound connection from the clientintent- the intent of the handshake (e.g., login or status)
-
ConnectionHandshakeEvent
Deprecated, for removal: This API element is subject to removal in a future version.This method is only retained to avoid breaking plugins that have not yet updated their integration tests.- Parameters:
connection- the inbound connection
-
-
Method Details
-
getConnection
Returns the inbound connection associated with this handshake.- Returns:
- the connection
-
getIntent
Returns theHandshakeIntentassociated with this connection handshake.- Returns:
- the intent of the handshake
-
toString
-
ConnectionHandshakeEvent(InboundConnection, HandshakeIntent)