VitalCloudNet4Driver

If you are running a CloudNET server, this will be the class to use when you want to communicate with it. This class is a wrapper for the CloudNET-Driver module and provides easier-to-use APIs for it.

Properties

Link copied to clipboard
val cloudServiceFactory: @UnknownNullability CloudServiceFactory
Link copied to clipboard
val cloudServiceProvider: @UnknownNullability CloudServiceProvider
Link copied to clipboard
val serviceTaskProvider: @UnknownNullability ServiceTaskProvider

Functions

Link copied to clipboard
fun getCloudServer(serverName: String): @Nullable ServiceInfoSnapshot?

Gets a single server by its serverName, e.g. Lobby-1, Lobby-2, etc.

Link copied to clipboard
fun getCloudServers(predicate: Predicate<ServiceInfoSnapshot> = Predicate { true }): List<ServiceInfoSnapshot?>

Gets all currently running servers that match the given predicate.

fun getCloudServers(taskName: String): @UnmodifiableView Collection<ServiceInfoSnapshot?>

Gets all servers of the given taskName, e.g. Lobby, Bedwars.

Link copied to clipboard
fun getServerTask(taskName: String): @Nullable ServiceTask?

Gets the ServiceTask of the given taskName.

Link copied to clipboard
fun startCloudServer(taskName: String): ServiceCreateResult?

Gets the ServiceTask by calling getServerTask with the given taskName and attempts to start a new server from it. If no task exists for the given taskName, this function does nothing.

Link copied to clipboard

Stops the server with the given serverName. If no server was found with the given serverName, this function does nothing.