Class LoginEvent.LoginResult

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

public static final class LoginEvent.LoginResult extends Object implements ResultedEvent.Result
Result for a login event.
  • 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()
      Get the reason for denying the login.
      Returns:
      the deny reason, or null if allowed
    • allowed

      public static LoginEvent.LoginResult allowed()
      Allow the login.
      Returns:
      an allowed result
    • denied

      public static LoginEvent.LoginResult denied(@Nonnull String reason)
      Deny the login with a reason.
      Parameters:
      reason - the reason to show the player
      Returns:
      a denied result