Package com.velocitypowered.api.proxy
Interface ConnectionRequestBuilder
-
public interface ConnectionRequestBuilderProvides a fluent interface to send a connection request to another server on the proxy. A connection request is created usingPlayer.createConnectionRequest(RegisteredServer).
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceConnectionRequestBuilder.ResultRepresents the result of a connection request.static classConnectionRequestBuilder.StatusRepresents the status of a connection request initiated by aConnectionRequestBuilder.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<ConnectionRequestBuilder.Result>connect()Initiates the connection to the remote server and emits a result on theCompletableFutureafter the user has logged on.CompletableFuture<Boolean>connectWithIndication()Initiates the connection to the remote server and emits a result on theCompletableFutureafter the user has logged on.voidfireAndForget()Initiates the connection to the remote server without waiting for a result.RegisteredServergetServer()Returns the server that this connection request represents.
-
-
-
Method Detail
-
getServer
RegisteredServer getServer()
Returns the server that this connection request represents.- Returns:
- the server this request will connect to
-
connect
CompletableFuture<ConnectionRequestBuilder.Result> connect()
Initiates the connection to the remote server and emits a result on theCompletableFutureafter the user has logged on. No messages will be communicated to the client: the user is responsible for all error handling.- Returns:
- a
CompletableFuturerepresenting the status of this connection
-
connectWithIndication
CompletableFuture<Boolean> connectWithIndication()
Initiates the connection to the remote server and emits a result on theCompletableFutureafter the user has logged on. Velocity's own built-in handling will be used to provide errors to the client.- Returns:
- a
CompletableFuturerepresenting the status of this connection
-
fireAndForget
void fireAndForget()
Initiates the connection to the remote server without waiting for a result. Velocity will use generic error handling code to notify the user.
-
-