Class ServerPostConnectEvent
java.lang.Object
com.velocitypowered.api.event.player.ServerPostConnectEvent
Fired after the player has connected to a server. The server the player is now connected to is
available in
Player.getCurrentServer(). Velocity will not wait on this event to finish
firing.-
Constructor Summary
ConstructorsConstructorDescriptionServerPostConnectEvent(Player player, @Nullable RegisteredServer previousServer) -
Method Summary
Modifier and TypeMethodDescriptionReturns the player that has completed the connection to the server.@Nullable RegisteredServerReturns the previous server the player was connected to.toString()
-
Constructor Details
-
ServerPostConnectEvent
-
-
Method Details
-
getPlayer
Returns the player that has completed the connection to the server.- Returns:
- the player
-
getPreviousServer
Returns the previous server the player was connected to. This isnullif they were not connected to another server beforehand (for instance, if the player has just joined the proxy).- Returns:
- the previous server the player was connected to
-
toString
-