Class PreSendOnLoginEvent
java.lang.Object
io.github._4drian3d.authmevelocity.api.velocity.event.PreSendOnLoginEvent
- All Implemented Interfaces:
ResultedEvent<ServerResult>
@AwaitingEvent
public final class PreSendOnLoginEvent
extends Object
implements ResultedEvent<ServerResult>
Event to be executed just before sending a player to another server after login/registration.
AuthMeVelocity will wait for the execution of this event to perform the given action, which means that you can modify the server to which the player will connect or if the player should not be sent to any server after being logged in
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.velocitypowered.api.event.ResultedEvent
ResultedEvent.ComponentResult, ResultedEvent.GenericResult, ResultedEvent.Result -
Constructor Summary
ConstructorsConstructorDescriptionPreSendOnLoginEvent(@NotNull Player player, @NotNull RegisteredServer actualServer, @NotNull RegisteredServer serverToSend) Create a new PreSendOnLoginEvent -
Method Summary
Modifier and TypeMethodDescription@NotNull RegisteredServerObtain the server on which the player is located@NotNull ServerResult@NotNull Playerplayer()Obtain the logged playervoidsetResult(@NotNull ServerResult newResult)
-
Constructor Details
-
PreSendOnLoginEvent
public PreSendOnLoginEvent(@NotNull @NotNull Player player, @NotNull @NotNull RegisteredServer actualServer, @NotNull @NotNull RegisteredServer serverToSend) Create a new PreSendOnLoginEvent- Parameters:
player- the player loggedactualServer- the server on which the player is locatedserverToSend- the server to which the player will be sent
-
-
Method Details
-
player
Obtain the logged player- Returns:
- the player
-
actualServer
Obtain the server on which the player is located- Returns:
- the actual server of the player
-
getResult
- Specified by:
getResultin interfaceResultedEvent<ServerResult>
-
setResult
- Specified by:
setResultin interfaceResultedEvent<ServerResult>
-