Class DefineAuthServerEvent

java.lang.Object
net.md_5.bungee.api.plugin.Event
com.nickuc.login.api.event.internal.bungee.BungeeEvent
com.nickuc.login.api.event.bungee.connection.DefineAuthServerEvent
All Implemented Interfaces:
EventWithPlayer

public class DefineAuthServerEvent extends BungeeEvent 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(net.md_5.bungee.api.connection.ProxiedPlayer player, net.md_5.bungee.api.config.ServerInfo originalServer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<net.md_5.bungee.api.config.ServerInfo>
    Returns the server originally used to connect.
    net.md_5.bungee.api.connection.ProxiedPlayer
    Returns the player instance.
    Optional<net.md_5.bungee.api.config.ServerInfo>
    Returns the server used to connect.
    void
    setServer(net.md_5.bungee.api.config.ServerInfo server)
    Defines the server that will be used for the connection.

    Methods inherited from class net.md_5.bungee.api.plugin.Event

    callEvent, postCall

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DefineAuthServerEvent

      public DefineAuthServerEvent(net.md_5.bungee.api.connection.ProxiedPlayer player, @Nullable net.md_5.bungee.api.config.ServerInfo originalServer)
  • Method Details

    • getPlayer

      public net.md_5.bungee.api.connection.ProxiedPlayer getPlayer()
      Returns the player instance.
      Specified by:
      getPlayer in interface EventWithPlayer
    • getOriginalServer

      public Optional<net.md_5.bungee.api.config.ServerInfo> getOriginalServer()
      Returns the server originally used to connect.
    • getServer

      public Optional<net.md_5.bungee.api.config.ServerInfo> getServer()
      Returns the server used to connect.
    • setServer

      public void setServer(net.md_5.bungee.api.config.ServerInfo server)
      Defines the server that will be used for the connection.
      Parameters:
      server - the server used for the connection.