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 theAwaitingEventcontract.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDisconnectEvent.LoginStatusThe status of the connection when the player disconnected.
-
Constructor Summary
Constructors Constructor Description DisconnectEvent(Player player, DisconnectEvent.LoginStatus loginStatus)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DisconnectEvent.LoginStatusgetLoginStatus()PlayergetPlayer()StringtoString()
-
-
-
Constructor Detail
-
DisconnectEvent
public DisconnectEvent(Player player, DisconnectEvent.LoginStatus loginStatus)
-
-
Method Detail
-
getPlayer
public Player getPlayer()
-
getLoginStatus
public DisconnectEvent.LoginStatus getLoginStatus()
-
-