public static final class PreLoginEvent.PreLoginComponentResult extends Object implements ResultedEvent.Result
| Modifier and Type | Method and Description |
|---|---|
static PreLoginEvent.PreLoginComponentResult |
allowed()
Returns a result indicating the connection will be allowed through the proxy.
|
static PreLoginEvent.PreLoginComponentResult |
denied(net.kyori.text.Component reason)
Deprecated.
|
static PreLoginEvent.PreLoginComponentResult |
denied(net.kyori.adventure.text.Component reason)
Denies the login with the specified reason.
|
static PreLoginEvent.PreLoginComponentResult |
forceOfflineMode()
Returns a result indicating the connection will be allowed through the proxy, but the
connection will be forced to use offline mode even when the proxy is running in online mode.
|
static PreLoginEvent.PreLoginComponentResult |
forceOnlineMode()
Returns a result indicating the connection will be allowed through the proxy, but the
connection will be forced to use online mode provided that the proxy is in offline mode.
|
Optional<net.kyori.text.Component> |
getReason()
Deprecated.
|
Optional<net.kyori.adventure.text.Component> |
getReasonComponent() |
boolean |
isAllowed()
Returns whether or not the event is allowed to proceed.
|
boolean |
isForceOfflineMode() |
boolean |
isOnlineModeAllowed() |
String |
toString() |
public boolean isAllowed()
ResultedEvent.ResultisAllowed in interface ResultedEvent.Result@Deprecated public Optional<net.kyori.text.Component> getReason()
public Optional<net.kyori.adventure.text.Component> getReasonComponent()
public boolean isOnlineModeAllowed()
public boolean isForceOfflineMode()
public static PreLoginEvent.PreLoginComponentResult allowed()
public static PreLoginEvent.PreLoginComponentResult forceOnlineMode()
allowed() on an online-mode proxy.public static PreLoginEvent.PreLoginComponentResult forceOfflineMode()
@Deprecated public static PreLoginEvent.PreLoginComponentResult denied(net.kyori.text.Component reason)
denied(net.kyori.adventure.text.Component)reason - the reason for disallowing the connectionpublic static PreLoginEvent.PreLoginComponentResult denied(net.kyori.adventure.text.Component reason)
reason - the reason for disallowing the connection