ApiWrapper

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

Author

Griefed

Parameters

properties

serverpackcreator.properties-file containing settings and configurations to load the API with.

runSetup

Whether to run the file-setup during API inizialization.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

This instances plugin manager for ServerPackCreator-plugins, if any are installed. This gives you access to the available extensions, should any be available in your instance of ServerPackCreator.

Link copied to clipboard

This instances settings used across ServerPackCreator, such as the working-directories, files and other settings.

Link copied to clipboard

This instances ConfigurationHandler for checking a given de.griefed.serverpackcreator.api.config.PackConfig for validity, so a server pack can safely be created from it.

Link copied to clipboard

This instances DocumentBuilder for working with XML-data.

Link copied to clipboard

This instances scanner to determine the sideness of Fabric mods.

Link copied to clipboard

This instances annotation scanner used to determine the sideness of Forge mods for Minecraft 1.12.2 and older.

Link copied to clipboard

This instances toml scanner to determine the sideness of Forge mods for Minecraft 1.13.x and newer.

Link copied to clipboard

This instances common JSON utilities used across ServerPackCreator.

Link copied to clipboard

This instances modscanner to determine the sideness of a given Forge, Fabric, LegacyFabric or Quilt mod.

Link copied to clipboard

This instances toml scanner to determine the sideness of NeoForge mods for Minecraft 1.20.5 and newer.

Link copied to clipboard
val objectMapper: ObjectMapper

This instances JSON-ObjectMapper used across ServerPackCreator with which this instance was initialized. By default, the ObjectMapper used across ServerPackCreator has the following features set:

Link copied to clipboard
Link copied to clipboard

This instances scanner to determine the sideness of Quilt mods.

Link copied to clipboard

This instances ServerPackHandler used to turn a de.griefed.serverpackcreator.api.config.PackConfig into a server pack.

Link copied to clipboard
Link copied to clipboard
val tomlParser: TomlParser

This instances toml parser to read and parse various .toml-files during mod-scanning, plugin- and extension config loading and provisioning, serverpackcreator.conf reading and more.

Link copied to clipboard

This instances collection of common utilities used across ServerPackCreator.

Link copied to clipboard

This instances version meta used for checking version-correctness of Minecraft and supported modloaders, as well as gathering information about Minecraft servers and modloader installers.

Link copied to clipboard
val versionsRegex: <Error class: unknown class>
Link copied to clipboard

This instances common web utilities used across ServerPackCreator.

Link copied to clipboard
val xmlJsonRegex: <Error class: unknown class>
Link copied to clipboard

This instances common XML utilities used across ServerPackCreator.

Functions

Link copied to clipboard
fun checkServerFilesFile(fileToCheckFor: File): Boolean

Check whether the specified server-files file exists and create it if it doesn't.

Link copied to clipboard
fun overwriteServerFilesFile(fileToOverwrite: File)

Overwrite the specified server-files file, even when it exists. Used to ensure files like the default script templates are always up-to-date.

Link copied to clipboard
fun setup(force: Boolean = false): ApiWrapper

Convenience method to set up ServerPackCreator.

Link copied to clipboard
fun stageOne()

Stage one of starting ServerPackCreator.