onServerPreConnectEvent

fun onServerPreConnectEvent(event: ServerPreConnectEvent): EventTask

Handles the ServerPreConnectEvent

This event is fired when a player is about to connect to a server. We use this event to start the server if it is not already running.

Return

an EventTask that will start the server if it is not already running

Parameters

event

the ServerPreConnectEvent

See also

ServerPreConnectEvent

(https://jd.papermc.io/velocity/3.4.0/com/velocitypowered/api/event/player/ServerPreConnectEvent.html)