Class DefineAuthServerEvent
java.lang.Object
com.nickuc.login.api.event.velocity.connection.DefineAuthServerEvent
- All Implemented Interfaces:
EventWithPlayer
Event triggered when a server connection operation is initiated for a player upon entering an authentication server.
Not available for PROXY implementations.
- Since:
- API v10
-
Constructor Summary
ConstructorsConstructorDescriptionDefineAuthServerEvent(com.velocitypowered.api.proxy.Player player, com.velocitypowered.api.proxy.server.RegisteredServer originalServer) -
Method Summary
Modifier and TypeMethodDescriptionOptional<com.velocitypowered.api.proxy.server.RegisteredServer> Returns the server originally used to connect.com.velocitypowered.api.proxy.PlayerReturns the player instance.Optional<com.velocitypowered.api.proxy.server.RegisteredServer> Returns the server used to connect.voidsetServer(com.velocitypowered.api.proxy.server.RegisteredServer server) Defines the server that will be used for the connection.
-
Constructor Details
-
DefineAuthServerEvent
public DefineAuthServerEvent(com.velocitypowered.api.proxy.Player player, @Nullable com.velocitypowered.api.proxy.server.RegisteredServer originalServer)
-
-
Method Details
-
getPlayer
public com.velocitypowered.api.proxy.Player getPlayer()Returns the player instance.- Specified by:
getPlayerin interfaceEventWithPlayer
-
getOriginalServer
Returns the server originally used to connect. -
getServer
Returns the server used to connect. -
setServer
public void setServer(@Nonnull com.velocitypowered.api.proxy.server.RegisteredServer server) Defines the server that will be used for the connection.- Parameters:
server- the server used for the connection.
-