Class AuthenticatedInitialServerEvent
java.lang.Object
pl.spcode.navauth.api.event.velocity.AuthenticatedInitialServerEvent
- All Implemented Interfaces:
NavAuthEvent
Represents an event that occurs after a player is connected and authenticated, (either by
auto-login or manual login) providing information about the player and the initial server they
are directed to. The initial server associated with this event can be modified during event
processing to redirect the player to a different server.
-
Constructor Summary
ConstructorsConstructorDescriptionAuthenticatedInitialServerEvent(com.velocitypowered.api.proxy.Player player, @Nullable com.velocitypowered.api.proxy.server.RegisteredServer initialServer) -
Method Summary
Modifier and TypeMethodDescriptionOptional<com.velocitypowered.api.proxy.server.RegisteredServer> com.velocitypowered.api.proxy.PlayervoidsetInitialServer(@Nullable com.velocitypowered.api.proxy.server.RegisteredServer server) Sets the new initial server.toString()
-
Constructor Details
-
AuthenticatedInitialServerEvent
public AuthenticatedInitialServerEvent(com.velocitypowered.api.proxy.Player player, @Nullable com.velocitypowered.api.proxy.server.RegisteredServer initialServer) - Parameters:
player- the player that was connectedinitialServer- the initial server selected by NavAuth, may benull
-
-
Method Details
-
getPlayer
public com.velocitypowered.api.proxy.Player getPlayer() -
getInitialServer
-
setInitialServer
public void setInitialServer(@Nullable com.velocitypowered.api.proxy.server.RegisteredServer server) Sets the new initial server.- Parameters:
server- the initial server the player should connect to
-
toString
-