Interface ServerPreConnectEvent
-
- All Superinterfaces:
Event,ResultedEvent<ServerPreConnectEvent.ServerResult>
- All Known Implementing Classes:
ServerPreConnectEventImpl
public interface ServerPreConnectEvent extends ResultedEvent<ServerPreConnectEvent.ServerResult>
This event is fired before the player connects to a server.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classServerPreConnectEvent.ServerResultRepresents the result of theServerPreConnectEvent.-
Nested classes/interfaces inherited from interface com.velocitypowered.api.event.ResultedEvent
ResultedEvent.ComponentResult, ResultedEvent.GenericResult, ResultedEvent.Result
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description RegisteredServeroriginalTarget()Returns the server that the player originally tried to connect to.Playerplayer()Returns the player connecting to the server.default voidreject()-
Methods inherited from interface com.velocitypowered.api.event.ResultedEvent
result, setResult
-
-
-
-
Method Detail
-
player
Player player()
Returns the player connecting to the server.- Returns:
- the player connecting to the server
-
originalTarget
RegisteredServer originalTarget()
Returns the server that the player originally tried to connect to. To get the server the player will connect to, see theServerPreConnectEvent.ServerResultof this event. To get the server the player is currently on when this event is fired, usePlayer.connectedServer().- Returns:
- the server that the player originally tried to connect to
-
reject
default void reject()
-
-