Interface ServerSideConnectionEvent.Handshake
- All Superinterfaces:
Event
,ServerSideConnectionEvent
,ServerSideConnectionEvent.ProfileScoped
- Enclosing interface:
ServerSideConnectionEvent
public static interface ServerSideConnectionEvent.Handshake
extends ServerSideConnectionEvent.ProfileScoped
Called after the client authenticates and attempts to switch to the
configuration phase. 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 Channel
s 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.Configuration
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)
.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.spongepowered.api.event.network.ServerSideConnectionEvent
ServerSideConnectionEvent.Auth, ServerSideConnectionEvent.Configuration, ServerSideConnectionEvent.Disconnect, ServerSideConnectionEvent.Handshake, ServerSideConnectionEvent.Intent, ServerSideConnectionEvent.Join, ServerSideConnectionEvent.Leave, ServerSideConnectionEvent.Login, ServerSideConnectionEvent.ProfileScoped
-
Method Summary
Methods inherited from interface org.spongepowered.api.event.network.ServerSideConnectionEvent
connection
Methods inherited from interface org.spongepowered.api.event.network.ServerSideConnectionEvent.ProfileScoped
profile