public class ConfigurationModel
extends java.lang.Object
| Constructor and Description |
|---|
ConfigurationModel()
Constructor for our ConfigurationModel.
|
ConfigurationModel(java.util.List<java.lang.String> clientMods,
java.util.List<java.lang.String> copyDirs,
java.lang.String modpackDir,
java.lang.String minecraftVersion,
java.lang.String modLoader,
java.lang.String modLoaderVersion,
java.lang.String javaArgs,
java.lang.String serverPackSuffix,
java.lang.String serverIconPath,
java.lang.String serverPropertiesPath,
boolean includeServerInstallation,
boolean includeServerIcon,
boolean includeServerProperties,
boolean includeZipCreation,
java.util.HashMap<java.lang.String,java.lang.String> scriptSettings,
java.util.HashMap<java.lang.String,java.util.ArrayList<com.electronwill.nightconfig.core.CommentedConfig>> addonsConfigs)
Construct a new configuration model with custom values.
|
ConfigurationModel(Utilities utilities,
java.io.File configFile)
Create a new configuration model from a config file.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<java.util.ArrayList<com.electronwill.nightconfig.core.CommentedConfig>> |
getAddonConfigs(java.lang.String addonId)
Get the list of configurations for a specific addon.
|
java.util.List<java.lang.String> |
getClientMods()
Getter for a list of clientside-only mods to exclude from server pack.
|
java.util.List<java.lang.String> |
getCopyDirs()
Getter for the list of directories in the modpack to copy to the server pack.
|
java.lang.String |
getFileDiskName()
Getter for the disk-name of the CurseForge project file.
|
java.lang.String |
getFileName()
Getter for the name of the CurseForge project file.
|
boolean |
getIncludeServerIcon()
Getter for whether the server-icon.png should be included in the server pack.
|
boolean |
getIncludeServerInstallation()
Getter for whether the modloader server installation should be included.
|
boolean |
getIncludeServerProperties()
Getter for whether the server.properties should be included in the server pack.
|
boolean |
getIncludeZipCreation()
Getter for whether a ZIP-archive of the server pack should be created.
|
java.lang.String |
getJavaArgs()
Getter for the Java arguments with which the start-scripts will be generated.
|
java.lang.String |
getMinecraftVersion()
Getter for the version of Minecraft used by the modpack.
|
java.lang.String |
getModLoader()
Getter for the modloader used by the modpack.
|
java.lang.String |
getModLoaderVersion()
Getter for the version of the modloader used by the modpack.
|
java.lang.String |
getModpackDir()
Getter for the path to the modpack directory.
|
com.fasterxml.jackson.databind.JsonNode |
getModpackJson()
Getter for the JsonNode containing all information about the modpack.
|
java.util.ArrayList<com.electronwill.nightconfig.core.CommentedConfig> |
getOrCreateAddonConfigList(java.lang.String addonId)
Get the configurations for the specified addon ID.
|
java.lang.String |
getProjectName()
Getter for the name of the CurseForge project.
|
java.util.HashMap<java.lang.String,java.lang.String> |
getScriptSettings()
Getter for the script settings used during script creation.
|
java.lang.String |
getServerIconPath()
Getter for the path to the server-icon.png to include in the server pack.
|
java.lang.String |
getServerPackSuffix()
Getter for the suffix of the server pack to be generated.
|
java.lang.String |
getServerPropertiesPath()
Getter for the path of the server.properties to include in the server pack.
|
ConfigurationModel |
save(java.io.File destination)
Save this configuration.
|
void |
setClientMods(java.util.List<java.lang.String> newClientMods)
Setter for the list of clientside-only mods to exclude from server pack.
|
void |
setCopyDirs(java.util.List<java.lang.String> newCopyDirs)
Setter for the list of directories in the modpack to copy to the server pack.
|
void |
setFileDiskName(java.lang.String fileName)
Setter for the disk-name of the CurseForge project file.
|
void |
setFileName(java.lang.String fileName)
Setter for the name of the CurseForge project file.
|
void |
setIncludeServerIcon(boolean newIncludeServerIcon)
Setter for whether the server-icon.png should be included in the server pack.
|
void |
setIncludeServerInstallation(boolean newIncludeServerInstallation)
Setter for whether the modloader server installation should be included.
|
void |
setIncludeServerProperties(boolean newIncludeServerProperties)
Setter for whether the server.properties should be included in the server pack.
|
void |
setIncludeZipCreation(boolean newIncludeZipCreation)
Setter for whether a ZIP-archive of the server pack should be created.
|
void |
setJavaArgs(java.lang.String javaArgs)
Setter for the Java arguments with which the start-scripts will be generated.
|
void |
setMinecraftVersion(java.lang.String newMinecraftVersion)
Setter for the Minecraft version used by the modpack.
|
void |
setModLoader(java.lang.String newModLoader)
Setter for the modloader used by the modpack.
|
void |
setModLoaderVersion(java.lang.String newModLoaderVersion)
Setter for the version of the modloader used by the modpack.
|
void |
setModpackDir(java.lang.String newModpackDir)
Setter for the path to the modpack directory.
|
void |
setModpackJson(com.fasterxml.jackson.databind.JsonNode modpackJson)
Setter for the JsonNode containing all information about the modpack.
|
void |
setProjectName(java.lang.String projectName)
Setter for the name of the CurseForge project.
|
void |
setScriptSettings(java.util.HashMap<java.lang.String,java.lang.String> settings)
Putter for the script settings used during script creation.
|
void |
setServerIconPath(java.lang.String serverIconPath)
Setter for the path of the server-icon.png to include in the server pack.
|
void |
setServerPackSuffix(java.lang.String serverPackSuffix)
Setter for the suffix of the server pack to be generated
|
void |
setServerPropertiesPath(java.lang.String serverPropertiesPath)
Setter for the path of the server.properties to include in the server pack.
|
java.lang.String |
toString() |
public ConfigurationModel()
public ConfigurationModel(java.util.List<java.lang.String> clientMods,
java.util.List<java.lang.String> copyDirs,
java.lang.String modpackDir,
java.lang.String minecraftVersion,
java.lang.String modLoader,
java.lang.String modLoaderVersion,
java.lang.String javaArgs,
java.lang.String serverPackSuffix,
java.lang.String serverIconPath,
java.lang.String serverPropertiesPath,
boolean includeServerInstallation,
boolean includeServerIcon,
boolean includeServerProperties,
boolean includeZipCreation,
java.util.HashMap<java.lang.String,java.lang.String> scriptSettings,
java.util.HashMap<java.lang.String,java.util.ArrayList<com.electronwill.nightconfig.core.CommentedConfig>> addonsConfigs)
clientMods - List of clientside mods to exclude from the server pack.copyDirs - List of directories and/or files to include in the server
pack.modpackDir - The path to the modpack.minecraftVersion - The Minecraft version the modpack uses.modLoader - The modloader the modpack uses. Either Forge,
Fabric or Quilt.modLoaderVersion - The modloader version the modpack uses.javaArgs - JVM flags to create the start scripts with.serverPackSuffix - Suffix to create the server pack with.serverIconPath - Path to the icon to use in the server pack.serverPropertiesPath - Path to the server.properties to create the server pack with.includeServerInstallation - Whether to install the modloader server in the server pack.includeServerIcon - Whether to include the server-icon.png in the server pack.includeServerProperties - Whether to include the server.properties in the server pack.includeZipCreation - Whether to create a ZIP-archive of the server pack.scriptSettings - Map containing key-value pairs to be used in start script
creation.addonsConfigs - Configuration for any and all addons used by this
configuration.public ConfigurationModel(Utilities utilities, java.io.File configFile) throws java.io.FileNotFoundException, com.electronwill.nightconfig.core.file.NoFormatFoundException
utilities - Instance of our SPC utilities.configFile - Configuration file to load.java.io.FileNotFoundException - if the specified file can not be found.com.electronwill.nightconfig.core.file.NoFormatFoundException - if the configuration format could not be determined by
Night-Config.public ConfigurationModel save(java.io.File destination)
destination - The file to store the configuration in.public java.util.Optional<java.util.ArrayList<com.electronwill.nightconfig.core.CommentedConfig>> getAddonConfigs(java.lang.String addonId)
addonId - The ID of the addon.public java.util.ArrayList<com.electronwill.nightconfig.core.CommentedConfig> getOrCreateAddonConfigList(java.lang.String addonId)
addonId - The ID identifying the addon for which to get the list of configurations.public java.lang.String getServerPackSuffix()
public void setServerPackSuffix(java.lang.String serverPackSuffix)
serverPackSuffix - The suffix of the server pack to be generated.public java.util.List<java.lang.String> getClientMods()
public void setClientMods(java.util.List<java.lang.String> newClientMods)
newClientMods - The new list of clientside-only mods to store.public java.util.List<java.lang.String> getCopyDirs()
public void setCopyDirs(java.util.List<java.lang.String> newCopyDirs)
newCopyDirs - The new list of directories to include in server pack to store.public java.lang.String getModpackDir()
public void setModpackDir(java.lang.String newModpackDir)
newModpackDir - The new modpack directory path to store.public java.lang.String getMinecraftVersion()
public void setMinecraftVersion(java.lang.String newMinecraftVersion)
newMinecraftVersion - The new Minecraft version to store.public java.lang.String getModLoader()
public void setModLoader(java.lang.String newModLoader)
newModLoader - The new modloader to store.public java.lang.String getModLoaderVersion()
public void setModLoaderVersion(java.lang.String newModLoaderVersion)
newModLoaderVersion - The new modloader version to store.public boolean getIncludeServerInstallation()
public void setIncludeServerInstallation(boolean newIncludeServerInstallation)
newIncludeServerInstallation - The new boolean to store.public boolean getIncludeServerIcon()
public void setIncludeServerIcon(boolean newIncludeServerIcon)
newIncludeServerIcon - The new boolean to store.public boolean getIncludeServerProperties()
public void setIncludeServerProperties(boolean newIncludeServerProperties)
newIncludeServerProperties - The new boolean to store.public boolean getIncludeZipCreation()
public void setIncludeZipCreation(boolean newIncludeZipCreation)
newIncludeZipCreation - The new boolean to store.public java.lang.String getJavaArgs()
public void setJavaArgs(java.lang.String javaArgs)
javaArgs - Sets the Java arguments with which the start-scripts will be generated.public com.fasterxml.jackson.databind.JsonNode getModpackJson()
public void setModpackJson(com.fasterxml.jackson.databind.JsonNode modpackJson)
modpackJson - JsonNode. The JsonNode containing all information about the modpack.public java.lang.String getProjectName()
public void setProjectName(java.lang.String projectName)
projectName - The name of the CurseForge project.public java.lang.String getFileName()
public void setFileName(java.lang.String fileName)
fileName - The name of the CurseForge project file.public java.lang.String getFileDiskName()
public void setFileDiskName(java.lang.String fileName)
fileName - The disk-name of the CurseForge project file.public java.lang.String getServerIconPath()
public void setServerIconPath(java.lang.String serverIconPath)
serverIconPath - The path to the server-icon.png to include in the server pack.public java.lang.String getServerPropertiesPath()
public void setServerPropertiesPath(java.lang.String serverPropertiesPath)
serverPropertiesPath - The path to the server.properties to include in the server pack.public java.util.HashMap<java.lang.String,java.lang.String> getScriptSettings()
public void setScriptSettings(java.util.HashMap<java.lang.String,java.lang.String> settings)
settings - Key-value pairs to be used in script creation.public java.lang.String toString()
toString in class java.lang.Object