java.lang.Object
io.github._4drian3d.authmevelocity.api.velocity.event.PreSendOnLoginEvent
All Implemented Interfaces:
ResultedEvent<ServerResult>

@AwaitingEvent public final class PreSendOnLoginEvent extends Object implements ResultedEvent<ServerResult>
Event to be executed just before sending a player to another server after login/registration.

AuthMeVelocity will wait for the execution of this event to perform the given action, which means that you can modify the server to which the player will connect or if the player should not be sent to any server after being logged in

  • Constructor Details

    • PreSendOnLoginEvent

      public PreSendOnLoginEvent(@NotNull @NotNull Player player, @NotNull @NotNull RegisteredServer actualServer, @NotNull @NotNull RegisteredServer serverToSend)
      Create a new PreSendOnLoginEvent
      Parameters:
      player - the player logged
      actualServer - the server on which the player is located
      serverToSend - the server to which the player will be sent
  • Method Details

    • player

      @NotNull public @NotNull Player player()
      Obtain the logged player
      Returns:
      the player
    • actualServer

      @NotNull public @NotNull RegisteredServer actualServer()
      Obtain the server on which the player is located
      Returns:
      the actual server of the player
    • getResult

      @NotNull public @NotNull ServerResult getResult()
      Obtain the result of the event
      Specified by:
      getResult in interface ResultedEvent<ServerResult>
      Returns:
      the event server result
    • setResult

      public void setResult(@NotNull @NotNull ServerResult newResult)
      Specified by:
      setResult in interface ResultedEvent<ServerResult>