Package com.velocitypowered.api.proxy
Interface ConnectionRequestBuilder.Result
-
- Enclosing interface:
- ConnectionRequestBuilder
public static interface ConnectionRequestBuilder.Result
Represents the result of a connection request.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description RegisteredServer
getAttemptedConnection()
Returns the server we actually tried to connect to.Optional<net.kyori.text.Component>
getReason()
Deprecated.UsegetReasonComponent()
insteadOptional<Component>
getReasonComponent()
Returns an (optional) textual reason for the failure to connect to the server.ConnectionRequestBuilder.Status
getStatus()
Returns the status associated with this result.default boolean
isSuccessful()
Determines whether or not the connection request was successful.
-
-
-
Method Detail
-
isSuccessful
default boolean isSuccessful()
Determines whether or not the connection request was successful.- Returns:
- whether or not the request succeeded
-
getStatus
ConnectionRequestBuilder.Status getStatus()
Returns the status associated with this result.- Returns:
- the status for this result
-
getReason
@Deprecated Optional<net.kyori.text.Component> getReason()
Deprecated.UsegetReasonComponent()
insteadReturns an (optional) textual reason for the failure to connect to the server.- Returns:
- the reason why the user could not connect to the server
-
getReasonComponent
Optional<Component> getReasonComponent()
Returns an (optional) textual reason for the failure to connect to the server.- Returns:
- the reason why the user could not connect to the server
-
getAttemptedConnection
RegisteredServer getAttemptedConnection()
Returns the server we actually tried to connect to.- Returns:
- the server we actually tried to connect to
-
-