Interface ServerSideConnectionEvent.Handshake

All Superinterfaces:
Event, ServerSideConnectionEvent
Enclosing interface:
ServerSideConnectionEvent

public static interface ServerSideConnectionEvent.Handshake extends ServerSideConnectionEvent
Called after the client authenticates and attempts to login to the server. This is the phase where plugins can perform a handshake with the client by sending login related packets and requests.

During this event, it's possible to use the Channels to send requests to the client. As long as there's requests going to the client, the connection will stay in the handshake phase and will not continue to the ServerSideConnectionEvent.Login event.

For example, a plugin sends a packet to the client to request its client side plugin version. The client responds and the plugin handles the response. If the plugin decides to send another packet, the plugin handshake phase will stay active. If the plugin doesn't send a packet, it can assumed that the plugin handshake is finished.

During the lifetime of the handshake phase, a ServerSideConnection can be terminated by calling EngineConnection.close(Component).