Class PreLoginEvent
java.lang.Object
com.velocitypowered.api.event.connection.PreLoginEvent
- All Implemented Interfaces:
ResultedEvent<PreLoginEvent.PreLoginComponentResult>
public final class PreLoginEvent
extends Object
implements ResultedEvent<PreLoginEvent.PreLoginComponentResult>
This event is fired when a player has initiated a connection with the proxy but before the proxy
authenticates the player with Mojang or before the player's proxy connection is fully established
(for offline mode).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRepresents an "allowed/allowed with forced online\offline mode/denied" result with a reason allowed for denial.Nested classes/interfaces inherited from interface com.velocitypowered.api.event.ResultedEvent
ResultedEvent.ComponentResult, ResultedEvent.GenericResult, ResultedEvent.Result -
Constructor Summary
ConstructorsConstructorDescriptionPreLoginEvent(InboundConnection connection, String username) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the result associated with this event.voidsetResult(@NonNull PreLoginEvent.PreLoginComponentResult result) Sets the result of this event.toString()
-
Constructor Details
-
PreLoginEvent
Creates a new instance.- Parameters:
connection- the connection logging into the proxyusername- the player's username
-
-
Method Details
-
getConnection
-
getUsername
-
getResult
Description copied from interface:ResultedEventReturns the result associated with this event.- Specified by:
getResultin interfaceResultedEvent<PreLoginEvent.PreLoginComponentResult>- Returns:
- the result of this event
-
setResult
Description copied from interface:ResultedEventSets the result of this event. The result must be non-null.- Specified by:
setResultin interfaceResultedEvent<PreLoginEvent.PreLoginComponentResult>- Parameters:
result- the new result
-
toString
-