Zum Hauptinhalt springen
Version: CloudNet v3.3

Tasks

Ein Task ist eine Konfiguration, von der Services gestartet werden können.

Konfiguration

The configuration path for each task is local/tasks/NAME.json
After changing a configuration, you need to execute tasks reload in the console.

Hinweis

We recommend managing the configurations with the tasks command. In diesem Fall muss die JSON-Syntax nicht beachtet werden und die Konfiguration muss nach Änderungen nicht neu geladen werden.

name

Dies definiert den Namen, der zusammen mit der inkrementellen ID verwendet wird, um Services zu identifizieren, die von diesem Task gestartet wurden (z. B. Proxy führt zu Proxy-1)

runtime

Dies legt die Laufzeit für Services fest, die von diesem Task gestartet werden.
Standardmäßig stellt CloudNet nur die "jvm"-Laufzeit zur Verfügung; weitere können über Module hinzugefügt werden.

disableIpRewrite

Aktiviert oder deaktiviert den IP-Rewrite für Services dieses Tasks (true/false)

Warnung

Wir empfehlen die Nutzung dieser Funktion nur in sehr speziellen Fällen.
Zum Beispiel, wenn mehrere Proxies für die Bedrock Edition genutzt werden sollen. (Leider unterstützt die Bedrock Edition keine SRV-Records. In diesem Fall sollte Kontakt mit unserem Support aufgenommen werden!)

wartungsmodus

Aktiviert oder deaktiviert den Wartungsmodus für Services dieses Tasks (true/false)

Information

If the maintenance mode is enabled, services of this task can have a special sign layout and users need the permission cloudnet.bridge.maintenance to join.

autoDeleteOnStop

Dies aktiviert oder deaktiviert das automatische Löschen von Service-Dateien, nachdem diese gestoppt wurden. (true/false)

Warnung

Diese Funktion sollte NICHT genutzt werden, um persistente Daten von Services wie einem "CityBuild" zu speichern. Stattdessen sollten static Services genutzt werden!

staticServices

Dies aktiviert oder deaktiviert statische Services. (true/false)
If disabled, services will be started in the temp directory.
If enabled, services will be started in the local/services/ directory.

associatedNodes

Here you can specify on which nodes the services from this task should be started.
If you leave the option empty (as it is by default), the services can be started on every node.
Example (starting the services on Nodes 1, 2 and 4):

  "associatedNodes": [
"Node-1",
"Node-2",
"Node-4"
],

groups

Here you can specify to which groups the task should belong.

deletedFilesAfterStop

Here you can specify files which should always be deleted after stopping the server.
This options works even when static services are enabled!


processConfiguration

environment

The environment services of this task should run in. Possible values are:

  • MINECRAFT_SERVER
  • GLOWSTONE
  • NUKKIT
  • GO_MINT
  • BUNGEECORD
  • VELOCITY
  • WATERDOG

maxHeapMemorySize

This defines the memory size (RAM) for services of this task.

jvmOptions

Here you can set custom jvm options. (For example the Aikar garbage collector flags options)

processParameters

Here you can set custom process parameters.


startPort

This is the port from which the cloud will use ports for the services.
You can use the same start port for multiple tasks, the system will use the next available port.

minServiceCount

This defines the minimum amount of services that should be always online from this task.

includes

The includes provides the possibility to download files when each service is prepared.
Example:

  "includes": [
{
"url": "https://cloudnetservice.eu/cloudnet/versions.json",
"destination": "plugins/versions.json",
"properties": {}
}
],

templates

This is an array of template configurations.
This means you can add multiple templates to one task. For example for different maps:

  "templates": [
{
"prefix": "BedWars",
"name": "2x1",
"storage": "local",
"alwaysCopyToStaticServices": false
},
{
"prefix": "BedWars",
"name": "3x4",
"storage": "local",
"alwaysCopyToStaticServices": false
}
]

deployments

The deployments provide the possibility to copy each service to a template when it is being shutdown.
Example:

  "deployments": [
{
"template": {
"prefix": "Proxy",
"name": "default",
"storage": "local",
"alwaysCopyToStaticServices": false
},
"excludes": [
"whitelist.yml",
"log.txt"
],
"properties": {}
}
],

properties

The properties can contain any json object which you can access trough the api.
By default, it contains only the SmartConfig from the Smart Module

Sample Configuration

{
"name": "Proxy",
"runtime": "jvm",
"disableIpRewrite": false,
"maintenance": false,
"autoDeleteOnStop": true,
"staticServices": false,
"associatedNodes": [],
"groups": ["Proxy"],
"deletedFilesAfterStop": [],
"processConfiguration": {
"environment": "BUNGEECORD",
"maxHeapMemorySize": 256,
"jvmOptions": [],
"processParameters": []
},
"startPort": 25565,
"minServiceCount": 0,
"includes": [],
"templates": [
{
"prefix": "Proxy",
"name": "default",
"storage": "local",
"alwaysCopyToStaticServices": false
}
],
"deployments": [],
"properties": {
"smartConfig": {
"enabled": false,
"priority": 10,
"directTemplatesAndInclusionsSetup": true,
"preparedServices": 0,
"dynamicMemoryAllocation": false,
"dynamicMemoryAllocationRange": 256,
"percentOfPlayersToCheckShouldAutoStopTheServiceInFuture": 0,
"autoStopTimeByUnusedServiceInSeconds": 180,
"percentOfPlayersForANewServiceByInstance": 100,
"forAnewInstanceDelayTimeInSeconds": 300,
"minNonFullServices": 0,
"templateInstaller": "INSTALL_ALL",
"maxServiceCount": -1
}
}
}