Class ServerConnectedEvent

  • public final class ServerConnectedEvent
    extends java.lang.Object
    This event is fired once the player has successfully connected to the target server and the connection to the previous server has been de-established.
    • Constructor Detail

      • ServerConnectedEvent

        public ServerConnectedEvent​(Player player,
                                    RegisteredServer server,
                                    @Nullable RegisteredServer previousServer)
        Constructs a ServerConnectedEvent.
        player - the player that was connected
        server - the server the player was connected to
        previousServer - the server the player was previously connected to, null if none
    • Method Detail

      • getPlayer

        public Player getPlayer()
      • getPreviousServer

        public java.util.Optional<RegisteredServer> getPreviousServer()
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object