-
Notifications
You must be signed in to change notification settings - Fork 32
Complete rework of the template and group system #276
Description
To make the template system dynamic and universal, we need to rethink the layout or the schema.
I was thinking we have "GroupTypes" that are linked to classes on a registry base. The classes can be extended later by modules. The classes or the interface contain methods to prepare the start and stop of the servers/proxies.
- Preparation
- Start
- Stop
- Delete
Now for the actual part of the template system, we make template groups where we make it possible to link several templates like in BedWars. This way we can theoretically determine the startup behavior of each group or implement our own system again.
In this case a template is based on a template group and the group on a server group from the hierarchical level. All this information is managed by name space in registries. To enable a ready API and diversity. All these things are managed by classes. A Template can have the type SpigotTemplate, another PaperTemplate and so on.
These classes indicate which fields exist. But certain fields must always exist.
Example configuration:
{
"displayname":"BedWars",
"id": "bw",
"grouptype": "ServerGroup",
"preprocessparameter": [
"-jar"
],
"processparameter": [],
"properties": {},
"templategroups": [
{
"id": "2x4",
"name": "2x4",
"preprocessparameter": [],
"processparameter": [],
"properties": {},
"templates": [
{
"id": "MAP_XYZ_A",
"name": "A Cool Map",
"type" : "PaperSpigot",
"executebleFilePattern": [
"paper.*\\.jar$)"
],
"startbehaviour": "ROUNDROBIN",
"memory": "128MB",
"preprocessparameter": [],
"processparameter": [],
"properties": {}
}
]
}
]
}If there are any changes, please discuss them under here.
With 'processparamter' and 'preprocessparameter' for group, template group and the template we have many possibilities for configuration.
Name or displayname is for nice output. The other for commands etc.
Properties for plugins.
And the patterns for the jars