Class DefineAuthServerEvent

java.lang.Object
com.nickuc.login.api.event.velocity.connection.DefineAuthServerEvent
All Implemented Interfaces:
EventWithPlayer

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

    Constructors
    Constructor
    Description
    DefineAuthServerEvent(com.velocitypowered.api.proxy.Player player, com.velocitypowered.api.proxy.server.RegisteredServer originalServer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<com.velocitypowered.api.proxy.server.RegisteredServer>
    Returns the server originally used to connect.
    com.velocitypowered.api.proxy.Player
    Returns the player instance.
    Optional<com.velocitypowered.api.proxy.server.RegisteredServer>
    Returns the server used to connect.
    void
    setServer(com.velocitypowered.api.proxy.server.RegisteredServer server)
    Defines the server that will be used for the connection.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      getPlayer in interface EventWithPlayer
    • getOriginalServer

      public Optional<com.velocitypowered.api.proxy.server.RegisteredServer> getOriginalServer()
      Returns the server originally used to connect.
    • getServer

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