Class DisconnectEvent

java.lang.Object
com.velocitypowered.api.event.connection.DisconnectEvent

@AwaitingEvent public final class DisconnectEvent extends Object
This event is fired when a player disconnects from the proxy. This operation can take place when the player disconnects due to normal network activity or when the proxy shuts down. Operations on the provided player, aside from basic data retrieval operations, may behave in undefined ways.

Velocity typically fires this event asynchronously and does not wait for a response. However, it will wait for all DisconnectEvents for every player on the proxy to fire successfully before the proxy shuts down. This event is the sole exception to the AwaitingEvent contract.