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 Summary
Modifier and TypeMethodDescriptionallowed()Indicates that the player is allowed to proceed to the next login stage.Denies the login attempt and disconnects the player with the specified reason.Gets the disconnect reason if the login was denied.booleanCheck if this result allows the action to proceed.
-
Method Details
-
isAllowed
public boolean isAllowed()Description copied from interface:ResultedEvent.ResultCheck if this result allows the action to proceed.- Specified by:
isAllowedin interfaceResultedEvent.Result- Returns:
- true if allowed
-
getDenyReason
Gets the disconnect reason if the login was denied.- Returns:
- The deny reason, or null if allowed.
-
allowed
Indicates that the player is allowed to proceed to the next login stage.- Returns:
- An allowed result.
-
denied
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.
-