Class PlayerChooseInitialServerEvent


  • public class PlayerChooseInitialServerEvent
    extends java.lang.Object
    Fired when a player has finished connecting to the proxy and we need to choose the first server to connect to.
    • Constructor Detail

      • PlayerChooseInitialServerEvent

        public PlayerChooseInitialServerEvent​(Player player,
                                              @Nullable RegisteredServer initialServer)
        Constructs a PlayerChooseInitialServerEvent.
        Parameters:
        player - the player that was connected
        initialServer - the initial server selected, may be null
    • Method Detail

      • getPlayer

        public Player getPlayer()
      • getInitialServer

        public java.util.Optional<RegisteredServer> getInitialServer()
      • setInitialServer

        public void setInitialServer​(RegisteredServer server)
        Sets the new initial server.
        Parameters:
        server - the initial server the player should connect to
      • toString

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