public final class PreLoginEvent extends Object implements ResultedEvent<PreLoginEvent.PreLoginComponentResult>
Modifier and Type | Class and Description |
---|---|
static class |
PreLoginEvent.PreLoginComponentResult
Represents an "allowed/allowed with forced online\offline mode/denied" result with a reason
allowed for denial.
|
ResultedEvent.ComponentResult, ResultedEvent.GenericResult, ResultedEvent.Result
Constructor and Description |
---|
PreLoginEvent(InboundConnection connection,
String username)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
InboundConnection |
getConnection() |
PreLoginEvent.PreLoginComponentResult |
getResult()
Returns the result associated with this event.
|
String |
getUsername() |
void |
setResult(@NonNull PreLoginEvent.PreLoginComponentResult result)
Sets the result of this event.
|
String |
toString() |
public PreLoginEvent(InboundConnection connection, String username)
connection
- the connection logging into the proxyusername
- the player's usernamepublic InboundConnection getConnection()
public String getUsername()
public PreLoginEvent.PreLoginComponentResult getResult()
ResultedEvent
getResult
in interface ResultedEvent<PreLoginEvent.PreLoginComponentResult>
public void setResult(@NonNull PreLoginEvent.PreLoginComponentResult result)
ResultedEvent
setResult
in interface ResultedEvent<PreLoginEvent.PreLoginComponentResult>
result
- the new result