Class ServerPreConnectEvent

java.lang.Object
com.velocitypowered.api.event.player.ServerPreConnectEvent
All Implemented Interfaces:
ResultedEvent<ServerPreConnectEvent.ServerResult>

@AwaitingEvent public final class ServerPreConnectEvent extends Object implements ResultedEvent<ServerPreConnectEvent.ServerResult>
This event is fired before the player connects to a server. Velocity will wait on this event to finish firing before initiating the connection.
  • Constructor Details

    • ServerPreConnectEvent

      public ServerPreConnectEvent(Player player, RegisteredServer originalServer)
      Creates the ServerPreConnectEvent.
      Parameters:
      player - the player who is connecting to a server
      originalServer - the server the player was trying to connect to
    • ServerPreConnectEvent

      public ServerPreConnectEvent(Player player, RegisteredServer originalServer, @Nullable RegisteredServer previousServer)
      Creates the ServerPreConnectEvent.
      Parameters:
      player - the player who is connecting to a server
      originalServer - the server the player was trying to connect to
      previousServer - the server the player is connected to
  • Method Details