Class ServerGroup
java.lang.Object
de.rexlcloud.core.server.ServerGroup
- All Implemented Interfaces:
Serializable
A group of servers or proxies started from the same template with the same settings, e.g.
Lobby.
Changing a group is done by the master (module API or panel); the setters only change this copy.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionServerGroup(@NonNull String name, @NonNull ServerType type, int memory, boolean staticServer, @Nullable String wrapper, int minServers, boolean fallback, boolean removeOldLogs, @NonNull String javaArguments, int maxPlayers, String javaCommand) Internal: groups are created by the master. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTemplate every server of the group starts from.@NonNull StringExtra JVM arguments of the servers, e.g.The Java the servers run with:javafrom the wrapper's PATH or the path of an installed runtime.intPlayer slots shown in the server list.intMemory of each server in MB.intHow many servers the cloud keeps running.@NonNull StringgetName()Name of the group; its servers are called<name>-1,<name>-2, ...@NonNull ServerTypegetType()Servers or proxies.@Nullable StringThe wrapper of a static group,nullotherwise.inthashCode()booleanThe group's servers run theserver.jarthe user put into the template (e.g.booleanWhether players are sent to this group's servers when they join or are kicked from another server.booleanWhether the logs of a static server are deleted when it starts.booleanWhether the group has one server that keeps its files on a fixed wrapper instead of starting fresh from the template.voidsetCustomJar(boolean customJar) The group's servers run theserver.jarthe user put into the template (e.g.voidsetFallback(boolean fallback) Whether players are sent to this group's servers when they join or are kicked from another server.voidsetJavaArguments(@NonNull String javaArguments) Extra JVM arguments of the servers, e.g.voidsetJavaCommand(String javaCommand) The Java the servers run with:javafrom the wrapper's PATH or the path of an installed runtime.voidsetMaxPlayers(int maxPlayers) Player slots shown in the server list.voidsetMemory(int memory) Memory of each server in MB.voidsetMinServers(int minServers) How many servers the cloud keeps running.voidsetRemoveOldLogs(boolean removeOldLogs) Whether the logs of a static server are deleted when it starts.
-
Constructor Details
-
ServerGroup
public ServerGroup(@NonNull @NonNull String name, @NonNull @NonNull ServerType type, int memory, boolean staticServer, @Nullable @Nullable String wrapper, int minServers, boolean fallback, boolean removeOldLogs, @NonNull @NonNull String javaArguments, int maxPlayers, String javaCommand) Internal: groups are created by the master.
-
-
Method Details
-
equals
-
getTemplateFolder
-
getDefaultTemplateFolder
Template every server of the group starts from. It lives insidegetTemplateFolder(), because only that folder is sent to the wrappers, which expect it asservers/templates/<group>/default. -
hashCode
-
getName
Name of the group; its servers are called<name>-1,<name>-2, ... -
getType
Servers or proxies. -
getMemory
public int getMemory()Memory of each server in MB. -
isStaticServer
public boolean isStaticServer()Whether the group has one server that keeps its files on a fixed wrapper instead of starting fresh from the template. -
getWrapper
The wrapper of a static group,nullotherwise. -
getMinServers
public int getMinServers()How many servers the cloud keeps running. -
isFallback
public boolean isFallback()Whether players are sent to this group's servers when they join or are kicked from another server. -
isRemoveOldLogs
public boolean isRemoveOldLogs()Whether the logs of a static server are deleted when it starts. -
getJavaArguments
Extra JVM arguments of the servers, e.g.-XX:+UseG1GC. -
getMaxPlayers
public int getMaxPlayers()Player slots shown in the server list. -
getJavaCommand
The Java the servers run with:javafrom the wrapper's PATH or the path of an installed runtime. -
isCustomJar
public boolean isCustomJar()The group's servers run theserver.jarthe user put into the template (e.g. a Minestom server with the MinestomBridge) instead of a downloaded Paper/Spigot jar. Such servers get no cloud plugin, no Paper/Spigot configuration and no start arguments; they read everything from their cloud.json. -
setMemory
public void setMemory(int memory) Memory of each server in MB. -
setMinServers
public void setMinServers(int minServers) How many servers the cloud keeps running. -
setFallback
public void setFallback(boolean fallback) Whether players are sent to this group's servers when they join or are kicked from another server. -
setRemoveOldLogs
public void setRemoveOldLogs(boolean removeOldLogs) Whether the logs of a static server are deleted when it starts. -
setJavaArguments
Extra JVM arguments of the servers, e.g.-XX:+UseG1GC. -
setMaxPlayers
public void setMaxPlayers(int maxPlayers) Player slots shown in the server list. -
setJavaCommand
The Java the servers run with:javafrom the wrapper's PATH or the path of an installed runtime. -
setCustomJar
public void setCustomJar(boolean customJar) The group's servers run theserver.jarthe user put into the template (e.g. a Minestom server with the MinestomBridge) instead of a downloaded Paper/Spigot jar. Such servers get no cloud plugin, no Paper/Spigot configuration and no start arguments; they read everything from their cloud.json.
-