Class ServerPostConnectEvent
- java.lang.Object
-
- com.velocitypowered.api.event.player.ServerPostConnectEvent
-
@Beta public class ServerPostConnectEvent extends Object
Fired after the player has connected to a server. The server the player is now connected to is available inPlayer.getCurrentServer(). Velocity will not wait on this event to finish firing.
-
-
Constructor Summary
Constructors Constructor Description ServerPostConnectEvent(Player player, @Nullable RegisteredServer previousServer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlayergetPlayer()Returns the player that has completed the connection to the server.@Nullable RegisteredServergetPreviousServer()Returns the previous server the player was connected to.StringtoString()
-
-
-
Constructor Detail
-
ServerPostConnectEvent
public ServerPostConnectEvent(Player player, @Nullable RegisteredServer previousServer)
-
-
Method Detail
-
getPlayer
public Player getPlayer()
Returns the player that has completed the connection to the server.- Returns:
- the player
-
getPreviousServer
public @Nullable RegisteredServer 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
-
-