Class AsyncLoginEvent.AsyncLoginResult

java.lang.Object
me.internalizable.numdrassl.api.event.connection.AsyncLoginEvent.AsyncLoginResult
All Implemented Interfaces:
ResultedEvent.Result
Enclosing class:
AsyncLoginEvent

public static final class AsyncLoginEvent.AsyncLoginResult extends Object implements ResultedEvent.Result
Represents the result of the asynchronous pre-login attempt.
  • Method Details

    • isAllowed

      public boolean isAllowed()
      Description copied from interface: ResultedEvent.Result
      Check if this result allows the action to proceed.
      Specified by:
      isAllowed in interface ResultedEvent.Result
      Returns:
      true if allowed
    • getDenyReason

      @Nullable public String getDenyReason()
      Gets the disconnect reason if the login was denied.
      Returns:
      The deny reason, or null if allowed.
    • allowed

      public static AsyncLoginEvent.AsyncLoginResult allowed()
      Indicates that the player is allowed to proceed to the next login stage.
      Returns:
      An allowed result.
    • denied

      public static AsyncLoginEvent.AsyncLoginResult denied(@Nonnull String reason)
      Denies the login attempt and disconnects the player with the specified reason.
      Parameters:
      reason - The kick message displayed to the client.
      Returns:
      A denied result.