Class PackConfig
-
- All Implemented Interfaces:
public class PackConfigA PackConfig contains the settings required to create a server pack. A configuration model usually consists of:
Modpack directory
Minecraft version
Modloader
Modloader version
Java args for the start scripts
Files and directories to copy to the server pack
Whether to pre-install the modloader server
Whether to include a server-icon
Whether to include a server.properties
Whether to create a ZIP-archive
Griefed
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPackConfig.Companion
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PackConfig()PackConfig(List<String> clientMods, List<String> whitelist, List<InclusionSpecification> copyDirs, String modpackDir, String minecraftVersion, String modLoader, String modLoaderVersion, String javaArgs, String serverPackSuffix, String serverIconPath, String serverPropertiesPath, Boolean includeServerIcon, Boolean includeServerProperties, Boolean includeZipCreation, HashMap<String, String> scriptSettings, HashMap<String, ArrayList<CommentedConfig>> pluginsConfigs)Construct a new configuration model with custom values. PackConfig(File configFile)Create a new configuration model from a config file.
-
Method Summary
-
-
Constructor Detail
-
PackConfig
PackConfig()
-
PackConfig
PackConfig(List<String> clientMods, List<String> whitelist, List<InclusionSpecification> copyDirs, String modpackDir, String minecraftVersion, String modLoader, String modLoaderVersion, String javaArgs, String serverPackSuffix, String serverIconPath, String serverPropertiesPath, Boolean includeServerIcon, Boolean includeServerProperties, Boolean includeZipCreation, HashMap<String, String> scriptSettings, HashMap<String, ArrayList<CommentedConfig>> pluginsConfigs)
Construct a new configuration model with custom values.
- Parameters:
clientMods- List of clientside mods to exclude from the server pack.whitelist- List of mods to include if present, regardless whether a match was found through clientModscopyDirs- 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.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.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.pluginsConfigs- Configuration for any and all plugins used by this configuration.
-
PackConfig
PackConfig(File configFile)
Create a new configuration model from a config file.
- Parameters:
configFile- Configuration file to load.
-
-
Method Detail
-
getNeoForge
final Regex getNeoForge()
-
getLegacyFabric
final Regex getLegacyFabric()
-
getWhitespace
final Regex getWhitespace()
-
getClientMods
final ArrayList<String> getClientMods()
-
getModsWhitelist
final ArrayList<String> getModsWhitelist()
-
getInclusions
final ArrayList<InclusionSpecification> getInclusions()
-
getScriptSettings
final HashMap<String, String> getScriptSettings()
-
getPluginsConfigs
final HashMap<String, ArrayList<CommentedConfig>> getPluginsConfigs()
-
getModpackDir
final String getModpackDir()
-
setModpackDir
final Unit setModpackDir(String value)
-
getMinecraftVersion
final String getMinecraftVersion()
-
setMinecraftVersion
final Unit setMinecraftVersion(String value)
-
getModloaderVersion
final String getModloaderVersion()
-
setModloaderVersion
final Unit setModloaderVersion(String value)
-
getJavaArgs
final String getJavaArgs()
-
setJavaArgs
final Unit setJavaArgs(String value)
-
getServerPackSuffix
final String getServerPackSuffix()
-
setServerPackSuffix
final Unit setServerPackSuffix(String value)
-
getServerIconPath
final String getServerIconPath()
-
setServerIconPath
final Unit setServerIconPath(String value)
-
getServerPropertiesPath
final String getServerPropertiesPath()
-
setServerPropertiesPath
final Unit setServerPropertiesPath(String value)
-
getModloader
final String getModloader()
-
setModloader
final Unit setModloader(String newModLoader)
-
isServerIconInclusionDesired
final Boolean isServerIconInclusionDesired()
-
setServerIconInclusionDesired
final Unit setServerIconInclusionDesired(Boolean value)
-
isServerPropertiesInclusionDesired
final Boolean isServerPropertiesInclusionDesired()
-
setServerPropertiesInclusionDesired
final Unit setServerPropertiesInclusionDesired(Boolean value)
-
isZipCreationDesired
final Boolean isZipCreationDesired()
-
setZipCreationDesired
final Unit setZipCreationDesired(Boolean value)
-
getModpackJson
final JsonNode getModpackJson()
-
setModpackJson
final Unit setModpackJson(JsonNode value)
-
getConfigVersion
final String getConfigVersion()
-
setConfigVersion
final Unit setConfigVersion(String value)
-
getCustomDestination
final Optional<File> getCustomDestination()
-
setCustomDestination
final Unit setCustomDestination(Optional<File> value)
-
getProjectID
String getProjectID()
-
setProjectID
Unit setProjectID(String value)
-
getVersionID
String getVersionID()
-
setVersionID
Unit setVersionID(String value)
-
getSource
ModpackSource getSource()
-
setSource
Unit setSource(ModpackSource value)
-
save
final PackConfig save(File destination, ApiProperties apiProperties)
Save this configuration to disk.
-
setPluginsConfigs
final Unit setPluginsConfigs(HashMap<String, ArrayList<CommentedConfig>> pluginConfigs)
-
getPluginConfigs
final ArrayList<CommentedConfig> getPluginConfigs(String pluginId)
-
setClientMods
final Unit setClientMods(List<String> newClientMods)
-
setModsWhitelist
final Unit setModsWhitelist(List<String> newModsWhitelist)
-
setInclusions
final Unit setInclusions(ArrayList<InclusionSpecification> newCopyDirs)
-
setScriptSettings
final Unit setScriptSettings(HashMap<String, String> settings)
-
-
-
-