Class AuthenticatedInitialServerEvent

java.lang.Object
pl.spcode.navauth.api.event.velocity.AuthenticatedInitialServerEvent
All Implemented Interfaces:
NavAuthEvent

public class AuthenticatedInitialServerEvent extends Object implements 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 Details

    • AuthenticatedInitialServerEvent

      public AuthenticatedInitialServerEvent(com.velocitypowered.api.proxy.Player player, @Nullable com.velocitypowered.api.proxy.server.RegisteredServer initialServer)
      Parameters:
      player - the player that was connected
      initialServer - the initial server selected by NavAuth, may be null
  • Method Details

    • getPlayer

      public com.velocitypowered.api.proxy.Player getPlayer()
    • getInitialServer

      public Optional<com.velocitypowered.api.proxy.server.RegisteredServer> 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

      public String toString()
      Overrides:
      toString in class Object