Package net.md_5.bungee.api
Class ServerConnectRequest.Builder
- java.lang.Object
-
- net.md_5.bungee.api.ServerConnectRequest.Builder
-
- Enclosing class:
- ServerConnectRequest
public static class ServerConnectRequest.Builder extends Object
Class that sets default properties/adds methods to the lombok builder generated class.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerConnectRequest
build()
ServerConnectRequest.Builder
callback(Callback<ServerConnectRequest.Result> callback)
Callback to execute post request.ServerConnectRequest.Builder
connectTimeout(int connectTimeout)
Timeout in milliseconds for request.ServerConnectRequest.Builder
reason(ServerConnectEvent.Reason reason)
Reason for connecting to server.ServerConnectRequest.Builder
retry(boolean retry)
Should the player be attempted to connect to the next server in their queue if the initial request fails.ServerConnectRequest.Builder
target(@NonNull ServerInfo target)
Target server to connect to.String
toString()
-
-
-
Method Detail
-
target
public ServerConnectRequest.Builder target(@NonNull @NonNull ServerInfo target)
Target server to connect to.- Returns:
this
.
-
reason
public ServerConnectRequest.Builder reason(@NonNull ServerConnectEvent.Reason reason)
Reason for connecting to server.- Returns:
this
.
-
callback
public ServerConnectRequest.Builder callback(Callback<ServerConnectRequest.Result> callback)
Callback to execute post request.- Returns:
this
.
-
connectTimeout
public ServerConnectRequest.Builder connectTimeout(int connectTimeout)
Timeout in milliseconds for request.- Returns:
this
.
-
retry
public ServerConnectRequest.Builder retry(boolean retry)
Should the player be attempted to connect to the next server in their queue if the initial request fails.- Returns:
this
.
-
build
public ServerConnectRequest build()
-
-