Class ServerPreConnectEvent
java.lang.Object
net.md_5.bungee.api.plugin.Event
com.nickuc.login.api.event.internal.bungee.BungeeEvent
com.nickuc.login.api.event.internal.bungee.BungeeCancellableEvent
com.nickuc.login.api.event.bungee.connection.ServerPreConnectEvent
- All Implemented Interfaces:
CancellableEvent,EventWithPlayer,net.md_5.bungee.api.plugin.Cancellable
Event triggered when a server connection operation is initiated for a player.
Not available for PROXY implementations.
- Since:
- API v8
-
Constructor Summary
ConstructorsConstructorDescriptionServerPreConnectEvent(net.md_5.bungee.api.connection.ProxiedPlayer player, ServerConnectType serverConnectType, net.md_5.bungee.api.config.ServerInfo originalServer) -
Method Summary
Modifier and TypeMethodDescriptionnet.md_5.bungee.api.config.ServerInfoReturns the server originally used to connect.net.md_5.bungee.api.connection.ProxiedPlayerReturns the player instance.net.md_5.bungee.api.config.ServerInfoReturns the server used to connect.Returns the type of connection used in this event.voidsetServer(net.md_5.bungee.api.config.ServerInfo server) Defines the server that will be used for the connection.Methods inherited from class com.nickuc.login.api.event.internal.bungee.BungeeCancellableEvent
isCancelled, setCancelledMethods inherited from class net.md_5.bungee.api.plugin.Event
callEvent, postCall
-
Constructor Details
-
ServerPreConnectEvent
public ServerPreConnectEvent(net.md_5.bungee.api.connection.ProxiedPlayer player, ServerConnectType serverConnectType, 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:
getPlayerin interfaceEventWithPlayer
-
getServerConnectType
Returns the type of connection used in this event. -
getOriginalServer
public net.md_5.bungee.api.config.ServerInfo getOriginalServer()Returns the server originally used to connect. -
getServer
public 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.
-