@Component
public class ServerPackHandler
extends java.lang.Object
| Constructor and Description |
|---|
ServerPackHandler(LocalizationManager injectedLocalizationManager,
ApplicationProperties injectedApplicationProperties,
VersionMeta injectedVersionMeta,
Utilities injectedUtilities,
ApplicationPlugins injectedApplicationPlugins)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
run(@NotNull ConfigurationModel configurationModel)
Create a server pack from a given instance of
ConfigurationModel. |
ServerPackModel |
run(@NotNull ServerPackModel serverPackModel)
Create a server pack from a given instance of
ServerPackModel via webUI. |
void |
zipBuilder(java.lang.String minecraftVersion,
boolean includeServerInstallation,
java.lang.String destination)
Creates a ZIP-archive of the server_pack directory excluding the Minecraft server JAR.
|
@Autowired public ServerPackHandler(LocalizationManager injectedLocalizationManager, ApplicationProperties injectedApplicationProperties, VersionMeta injectedVersionMeta, Utilities injectedUtilities, ApplicationPlugins injectedApplicationPlugins) throws java.io.IOException
Used for Dependency Injection.
Receives an instance of LocalizationManager or creates one if the received one is
null. Required for use of localization.
injectedLocalizationManager - Instance of LocalizationManager required for
localized log messages.injectedApplicationProperties - Instance of Properties required for various
different things.injectedVersionMeta - Instance of VersionMeta required for everything version
related.injectedUtilities - Instance of Utilities.injectedApplicationPlugins - Instance of ApplicationPlugins.java.io.IOException - if the VersionMeta could not be instantiated.public ServerPackModel run(@NotNull @NotNull ServerPackModel serverPackModel)
ServerPackModel via webUI.serverPackModel - An instance of ServerPackModel which contains the configuration
of the modpack.ServerPackModel which got altered during the creation of
said server pack.public boolean run(@NotNull
@NotNull ConfigurationModel configurationModel)
ConfigurationModel.configurationModel - An instance of ConfigurationModel which contains the
configuration of the modpack from which the server pack is to be created.public void zipBuilder(java.lang.String minecraftVersion,
boolean includeServerInstallation,
java.lang.String destination)
minecraftVersion - String. Determines the name of the Minecraft server JAR to exclude from
the ZIP-archive if the modloader is Forge.includeServerInstallation - Boolean. Determines whether the Minecraft server JAR info
should be printed.destination - String. The destination where the ZIP-archive should be created in.