Package-level declarations

Core-package of ServerPackCreator.

Server packs are created using de.griefed.serverpackcreator.api.ConfigurationModel, which can be checked for errors using de.griefed.serverpackcreator.api.ConfigurationHandler.checkConfiguration and any of the available variants. Afterwards, when the checks of the given configuration model return no errors, it is fed into de.griefed.serverpackcreator.api.ServerPackHandler.run, which creates finally creates your server pack.

In other words, the intended workflow is as follows:

  1. Create a de.griefed.serverpackcreator.api.ConfigurationModel.

  2. Check it using de.griefed.serverpackcreator.api.ConfigurationHandler.checkConfiguration or variants.

  3. Create the server pack using de.griefed.serverpackcreator.api.ServerPackHandler.run.

Should you wish to customize your instance of ServerPackCreator, see de.griefed.serverpackcreator.api.ApplicationProperties. If you wish to enhance your instance of ServerPackCreator with plugins, see de.griefed.serverpackcreator.api.Applicationplugins and

Core-package of ServerPackCreator.

Server packs are created using de.griefed.serverpackcreator.api.ConfigurationModel, which can be checked for errors using de.griefed.serverpackcreator.api.ConfigurationHandler.checkConfiguration and any of the available variants. Afterwards, when the checks of the given configuration model return no errors, it is fed into de.griefed.serverpackcreator.api.ServerPackHandler.run, which creates finally creates your server pack.

In other words, the intended workflow is as follows:

  1. Create a de.griefed.serverpackcreator.api.ConfigurationModel.

  2. Check it using de.griefed.serverpackcreator.api.ConfigurationHandler.checkConfiguration or variants.

  3. Create the server pack using de.griefed.serverpackcreator.api.ServerPackHandler.run.

Should you wish to customize your instance of ServerPackCreator, see de.griefed.serverpackcreator.api.ApplicationProperties. If you wish to enhance your instance of ServerPackCreator with plugins, see de.griefed.serverpackcreator.api.Applicationplugins and

Types

Link copied to clipboard
abstract class Api<F>

Basic implementations of the API-class holding properties and functions/methods which should be provided to the given implementer.

Link copied to clipboard
expect class ApiPlugins

Manager for ServerPackCreator plugins. In itself it doesn't do much. It gathers lists of all available extensions for TabExtension,PreGenExtension,PreZipExtension and PostGenExtension so they can then be run during server pack generation and during initialization of the GUI.

actual class ApiPlugins(tomlParser: TomlParser, apiProperties: ApiProperties, versionMeta: VersionMeta, utilities: Utilities) : JarPluginManager

Manager for ServerPackCreator plugins. In itself it doesn't do much. It gathers lists of all available extensions for TabExtension,PreGenExtension,PreZipExtension and PostGenExtension so they can then be run during server pack generation and during initialization of the GUI.

Link copied to clipboard
expect class ApiProperties

Base settings of ServerPackCreator, such as working directories, default list of clientside-only mods, default list of directories to include in a server pack, script templates, java paths and much more.

actual class ApiProperties(fileUtilities: FileUtilities, systemUtilities: SystemUtilities, listUtilities: ListUtilities, jarUtilities: JarUtilities, propertiesFile: File = File("serverpackcreator.properties"))

Base settings of ServerPackCreator, such as working directories, default list of clientside-only mods, default list of directories to include in a server pack, script templates, java paths and much more.

Link copied to clipboard
expect class ApiWrapper

API wrapper, allowing you to conveniently initialize, setup and use the different aspects of ServerPackCreator.

actual class ApiWrapper : Api<File>

API wrapper, allowing you to conveniently initialize, setup and use the different aspects of ServerPackCreator.

Link copied to clipboard

Conveniently access all different check-types, whether they passed and which errors, if any, were encountered.

Link copied to clipboard
abstract class Configuration<F, P>

Base for the de.griefed.serverpackcreator.api.ConfigurationHandler to ensure we have the basics for config-checks and config-handling.

Link copied to clipboard

Check any given PackConfig for errors and, if so desired, add them to a passed list of errors, so you may display them in a GUI, CLI or website. The most important method is checkConfiguration and all of its variants which will check your passed configuration model for errors, indicating whether it is safe to use for further operations. Running your model through the checks also ensures that the default script settings are present and set according to your pack's environment.

actual class ConfigurationHandler(versionMeta: VersionMeta, apiProperties: ApiProperties, utilities: Utilities, apiPlugins: ApiPlugins) : Configuration<File, Path>

Check any given PackConfig for errors and, if so desired, add them to a passed list of errors, so you may display them in a GUI, CLI or website. The most important method is checkConfiguration and all of its variants which will check your passed configuration model for errors, indicating whether it is safe to use for further operations. Running your model through the checks also ensures that the default script settings are present and set according to your pack's environment.

Link copied to clipboard

Method by which to exclude mods during the generation of a server pack.

Link copied to clipboard
expect class InclusionSpecification(source: String, destination: String? = null, inclusionFilter: String? = null, exclusionFilter: String? = null)

A FileInclusionSpecification is at minimum a source-declaration from which files and directories will be included in the server pack to be generated.

actual class InclusionSpecification(var source: String, var destination: String?, var inclusionFilter: String?, var exclusionFilter: String?)

A FileInclusionSpecification is at minimum a source-declaration from which files and directories will be included in the server pack to be generated.

Link copied to clipboard
@Plugin(name = "ServerPackCreatorConfigFactory", category = "ConfigurationFactory")
class LoggingConfig : ConfigurationFactory

Custom logging configuration setup to prevent incorrect log-directories when executing ServerPackCreator from CLI from a completely other directory. Or possibly when using symlinks, too. This class prevents the logs being written to the logs-directory inside the directory from which SPC is being run from.

Link copied to clipboard
abstract class Pack<F, J, out P>

A server pack configuration from which to generate a server pack.

Link copied to clipboard
expect open class PackConfig

A PackConfig contains the settings required to create a server pack. A configuration model usually consists of:

actual open class PackConfig : Pack<File, JsonNode, PackConfig>

A PackConfig contains the settings required to create a server pack. A configuration model usually consists of:

Link copied to clipboard
abstract class ServerPack<F, TS, TF>

Base-class for the de.griefed.serverpackcreator.api.ServerPackHandler to ensure we have the most important methods for generating a server pack from a given configuration.

Link copied to clipboard
expect class ServerPackFile

A ServerPackFile represents a source-destination-combination of two files/directories. The source is the file/directory, usually in the modpack, whilst the destination is the file to which the source is supposed to be copied to in the server pack.

actual class ServerPackFile

A ServerPackFile represents a source-destination-combination of two files/directories. The source is the file/directory, usually in the modpack, whilst the destination is the file to which the source is supposed to be copied to in the server pack.

Link copied to clipboard
expect class ServerPackHandler(apiProperties: ApiProperties, versionMeta: VersionMeta, utilities: Utilities, apiPlugins: ApiPlugins, modScanner: ModScanner)

Everything revolving around creating a server pack. The intended workflow is to create a PackConfig and run it through any of the available ConfigurationHandler.checkConfiguration-variants, and then call run with the previously checked configuration model. You may run with an unchecked configuration model, but no guarantees or promises, yes not even support, is given for running a model without checking it first.

actual class ServerPackHandler(apiProperties: ApiProperties, versionMeta: VersionMeta, utilities: Utilities, apiPlugins: ApiPlugins, modScanner: ModScanner) : ServerPack<File, TreeSet<String>, TreeSet<File>>

Everything revolving around creating a server pack. The intended workflow is to create a PackConfig and run it through any of the available ConfigurationHandler.checkConfiguration-variants, and then call run with the previously checked configuration model. You may run with an unchecked configuration model, but no guarantees or promises, yes not even support, is given for running a model without checking it first.