Class PathsConfig
-
- All Implemented Interfaces:
public final class PathsConfigSettings-group for ServerPackCreators home-directory and every directory and file derived from it: configs, logs, manifests, work/temp, modpacks, server-files with the default templates, plugins, the server-packs directory with its override, and the Tomcat-directories of the webservice. The home-directory itself resolves through the given preferences. Extracted from ApiProperties (refactor Phase 1b); ApiProperties remains the facade through which consumers access these values.
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PathsConfig(PropertyStore store, Preferences preferences, JarInformation jarInformation, Boolean devBuild, File workingDirectory)
-
Method Summary
Modifier and Type Method Description final FilegetHome()Default home-directory for ServerPackCreator: the directory containing the ServerPackCreator JAR. final FilegetHomeDirectory()ServerPackCreators home directory, in which all important files and folders are stored in. final UnitsetHomeDirectory(File value)ServerPackCreators home directory, in which all important files and folders are stored in. final FilegetServerPackCreatorPropertiesFile()The serverpackcreator.properties-file which both resulted from starting ServerPackCreator and provided the settings, properties and configurations for the currently running instance.final FilegetOverridesPropertiesFile()Overrides which, well, override, any property which may be set in the regular serverPackCreatorPropertiesFile. final FilegetDefaultConfig()Default configuration-file for a server pack generation inside ServerPackCreators home-directory. final FilegetConfigsDirectory()Directory in which ServerPackCreator configurations from the GUI get saved in by default. final FilegetTomcatBaseDirectory()Base-directory for Tomcat, used by the webservice-side of ServerPackCreator. final UnitsetTomcatBaseDirectory(File value)Base-directory for Tomcat, used by the webservice-side of ServerPackCreator. final FilegetServerPacksDirectory()Directory in which generated server packs, or server packs being generated, are stored in, as well as their ZIP-archives, if created. final UnitsetServerPacksDirectory(File value)Directory in which generated server packs, or server packs being generated, are stored in, as well as their ZIP-archives, if created. final FilegetLogsDirectory()Storage location for logs created by ServerPackCreator. final FilegetTomcatLogsDirectory()Logs-directory for Tomcat, used by the webservice-side of ServerPackCreator. final UnitsetTomcatLogsDirectory(File value)Logs-directory for Tomcat, used by the webservice-side of ServerPackCreator. final FilegetManifestsDirectory()Directory to which default/fallback manifests are copied to during the startup of ServerPackCreator. final FilegetFabricIntermediariesManifest()The Fabric intermediaries manifest containing all required information about Fabrics intermediaries. final FilegetLegacyFabricGameManifest()The LegacyFabric game version manifest containing information about which Minecraft version LegacyFabric is available for. final FilegetLegacyFabricLoaderManifest()LegacyFabric loader manifest containing information about Fabric loader maven versions. final FilegetLegacyFabricInstallerManifest()LegacyFabric installer manifest containing information about available LegacyFabric installers with which to install a server. final FilegetFabricInstallerManifest()Fabric installer manifest containing information about available Fabric installers with which to install a server. final FilegetQuiltVersionManifest()Quilt version manifest containing information about available Quilt loader versions. final FilegetQuiltInstallerManifest()Quilt installer manifest containing information about available Quilt installers with which to install a server. final FilegetForgeVersionManifest()Forge version manifest containing information about available Forge loader versions. final FilegetOldNeoForgeVersionManifest()Old NeoForge version manifest containing information about available NeoForge loader versions. final FilegetNewNeoForgeVersionManifest()New NeoForge version manifest containing information about available NeoForge loader versions. final FilegetFabricVersionManifest()Fabric version manifest containing information about available Fabric loader versions. final FilegetMinecraftServerManifestsDirectory()Directory to which Minecraft server manifests are copied during the startup of ServerPackCreator. final FilegetMinecraftVersionManifest()Minecraft version manifest containing information about available Minecraft versions. final FilegetWorkDirectory()Work-directory for storing temporary, non-critical, files and directories. final FilegetInstallerCacheDirectory()Caching directory for various types of installers. final FilegetTempDirectory()Temp-directory storing files and folders required temporarily during the run of a server pack generation or other operations. final FilegetModpacksDirectory()Modpacks directory in which uploaded modpack ZIP-archives and extracted modpacks are stored. final FilegetServerFilesDirectory()Directory in which default server-files are stored in. final FilegetDefaultShellScriptTemplate()The default shell-template for the modded server start scripts. final FilegetDefaultFishScriptTemplate()The default fish-template for the modded server start scripts. final FilegetDefaultPowerShellScriptTemplate()The default PowerShell-template for the modded server start scripts. final FilegetDefaultBatchScriptTemplate()The default Batch-template for the modded server start scripts. final FilegetDefaultJavaShellScriptTemplate()The default shell-template for the java-install scripts. final FilegetDefaultJavaFishScriptTemplate()The default fish-template for the java-install scripts. final FilegetDefaultJavaPowerShellScriptTemplate()The default PowerShell-template for the java-install scripts. final FilegetDefaultJavaBatchScriptTemplate()The path a Batch template for the java-install scripts would have, if one existed. final FilegetPropertiesDirectory()Directory in which the properties for quick selection are to be stored in and retrieved from. final FilegetIconsDirectory()Directory in which the icons for quick selection are to be stored in and retrieved from. final FilegetDefaultServerProperties()Default server.properties-file used by Minecraft servers. final FilegetDefaultServerIcon()Default server-icon.png-file used by Minecraft servers. final FilegetDefaultVariablesTemplate()The variables.txttemplate shipped with SPC, in theserver_files-directory inside its home-directory.final FilegetPluginsDirectory()Directory in which plugins for ServerPackCreator are to be placed in. final FilegetPluginsConfigsDirectory()Directory in which plugin-specific configurations are stored in. final FiledefaultTomcatBaseDirectory()Where the web backend's Tomcat keeps its working files: always the home directory. final FiledefaultServerPacksDirectory()Where generated packs go unless a configuration overrides the destination. final FiledefaultTomcatLogsDirectory()Where the web backend logs, falling back when the configured location is not writable. -
-
Constructor Detail
-
PathsConfig
PathsConfig(PropertyStore store, Preferences preferences, JarInformation jarInformation, Boolean devBuild, File workingDirectory)
-
-
Method Detail
-
getHome
final File getHome()
Default home-directory for ServerPackCreator: the directory containing the ServerPackCreator JAR.
-
getHomeDirectory
final File getHomeDirectory()
ServerPackCreators home directory, in which all important files and folders are stored in.
Changes made to this variable are stored in an overrides.properties inside the installation directory of the ServerPackCreator application.
Every operation is based on this home-directory, with the exception being the serverPacksDirectory, which can be configured independently of ServerPackCreators home-directory.
-
setHomeDirectory
final Unit setHomeDirectory(File value)
ServerPackCreators home directory, in which all important files and folders are stored in.
Changes made to this variable are stored in an overrides.properties inside the installation directory of the ServerPackCreator application.
Every operation is based on this home-directory, with the exception being the serverPacksDirectory, which can be configured independently of ServerPackCreators home-directory.
-
getServerPackCreatorPropertiesFile
final File getServerPackCreatorPropertiesFile()
The
serverpackcreator.properties-file which both resulted from starting ServerPackCreator and provided the settings, properties and configurations for the currently running instance.
-
getOverridesPropertiesFile
final File getOverridesPropertiesFile()
Overrides which, well, override, any property which may be set in the regular serverPackCreatorPropertiesFile.
-
getDefaultConfig
final File getDefaultConfig()
Default configuration-file for a server pack generation inside ServerPackCreators home-directory.
-
getConfigsDirectory
final File getConfigsDirectory()
Directory in which ServerPackCreator configurations from the GUI get saved in by default.
-
getTomcatBaseDirectory
final File getTomcatBaseDirectory()
Base-directory for Tomcat, used by the webservice-side of ServerPackCreator.
-
setTomcatBaseDirectory
final Unit setTomcatBaseDirectory(File value)
Base-directory for Tomcat, used by the webservice-side of ServerPackCreator.
-
getServerPacksDirectory
final File getServerPacksDirectory()
Directory in which generated server packs, or server packs being generated, are stored in, as well as their ZIP-archives, if created.
By default, this directory will be the
server-packs-directory in the home-directory of ServerPackCreator, but it can be configured using the propertyde.griefed.serverpackcreator.configuration.directories.serverpacksand can even be configured to be completely independent of ServerPackCreators home-directory.
-
setServerPacksDirectory
final Unit setServerPacksDirectory(File value)
Directory in which generated server packs, or server packs being generated, are stored in, as well as their ZIP-archives, if created.
By default, this directory will be the
server-packs-directory in the home-directory of ServerPackCreator, but it can be configured using the propertyde.griefed.serverpackcreator.configuration.directories.serverpacksand can even be configured to be completely independent of ServerPackCreators home-directory.
-
getLogsDirectory
final File getLogsDirectory()
Storage location for logs created by ServerPackCreator. This is the
logs-directory inside ServerPackCreators home-directory.
-
getTomcatLogsDirectory
final File getTomcatLogsDirectory()
Logs-directory for Tomcat, used by the webservice-side of ServerPackCreator.
-
setTomcatLogsDirectory
final Unit setTomcatLogsDirectory(File value)
Logs-directory for Tomcat, used by the webservice-side of ServerPackCreator.
-
getManifestsDirectory
final File getManifestsDirectory()
Directory to which default/fallback manifests are copied to during the startup of ServerPackCreator.
When the de.griefed.serverpackcreator.api.versionmeta.VersionMeta is initialized, the manifests copied to this directory will provide ServerPackCreator with the information required to check and create your server packs.
By default, this is the
manifests-directory inside ServerPackCreators home-directory.
-
getFabricIntermediariesManifest
final File getFabricIntermediariesManifest()
The Fabric intermediaries manifest containing all required information about Fabrics intermediaries. These intermediaries are used by Quilt, Fabric and LegacyFabric.
By default, the
fabric-intermediaries-manifest.json-file resides in themanifests-directory inside ServerPackCreators home-directory.
-
getLegacyFabricGameManifest
final File getLegacyFabricGameManifest()
The LegacyFabric game version manifest containing information about which Minecraft version LegacyFabric is available for.
By default, the
legacy-fabric-game-manifest.json-file resides in themanifests-directory inside ServerPackCreators home-directory.
-
getLegacyFabricLoaderManifest
final File getLegacyFabricLoaderManifest()
LegacyFabric loader manifest containing information about Fabric loader maven versions.
By default, the
legacy-fabric-loader-manifest.json-file resides in themanifests-directory inside ServerPackCreators home-directory.
-
getLegacyFabricInstallerManifest
final File getLegacyFabricInstallerManifest()
LegacyFabric installer manifest containing information about available LegacyFabric installers with which to install a server.
By default, the
legacy-fabric-installer-manifest.xml-file resides in themanifests-directory inside ServerPackCreators home-directory.
-
getFabricInstallerManifest
final File getFabricInstallerManifest()
Fabric installer manifest containing information about available Fabric installers with which to install a server.
By default, the
fabric-installer-manifest.xml-file resides in themanifests-directory inside ServerPackCreators home-directory.
-
getQuiltVersionManifest
final File getQuiltVersionManifest()
Quilt version manifest containing information about available Quilt loader versions.
By default, the
quilt-manifest.xml-file resides in themanifests-directory inside ServerPackCreators home-directory.
-
getQuiltInstallerManifest
final File getQuiltInstallerManifest()
Quilt installer manifest containing information about available Quilt installers with which to install a server.
By default, the
quilt-installer-manifest.xml-file resides in themanifests-directory inside ServerPackCreators home-directory.
-
getForgeVersionManifest
final File getForgeVersionManifest()
Forge version manifest containing information about available Forge loader versions.
By default, the
forge-manifest.json-file resides in themanifests-directory inside ServerPackCreators home-directory.
-
getOldNeoForgeVersionManifest
final File getOldNeoForgeVersionManifest()
Old NeoForge version manifest containing information about available NeoForge loader versions. This manifest only contains versions for Minecraft 1.20.1.
By default, the
neoforge-manifest.xml-file resides in themanifests-directory inside ServerPackCreators home-directory.
-
getNewNeoForgeVersionManifest
final File getNewNeoForgeVersionManifest()
New NeoForge version manifest containing information about available NeoForge loader versions. This manifest contains versions for Minecraft 1.20.2 and up.
By default, the
neoforge-manifest-new.xml-file resides in themanifests-directory inside ServerPackCreators home-directory.
-
getFabricVersionManifest
final File getFabricVersionManifest()
Fabric version manifest containing information about available Fabric loader versions.
By default, the
fabric-manifest.xml-file resides in themanifests-directory inside ServerPackCreators home-directory.
-
getMinecraftServerManifestsDirectory
final File getMinecraftServerManifestsDirectory()
Directory to which Minecraft server manifests are copied during the startup of ServerPackCreator.
When the de.griefed.serverpackcreator.api.versionmeta.VersionMeta is initialized, the manifests copied to this directory will provide ServerPackCreator with the information required to check and create your server packs.
The Minecraft server manifests contain information about the Java version required, the download-URL of the server-JAR and much more.
By default, this is the
mcserver-directory inside themanifests-directory inside ServerPackCreators home-directory.
-
getMinecraftVersionManifest
final File getMinecraftVersionManifest()
Minecraft version manifest containing information about available Minecraft versions.
By default, the
minecraft-manifest.json-file resides in themanifests-directory inside ServerPackCreators home-directory.
-
getWorkDirectory
final File getWorkDirectory()
Work-directory for storing temporary, non-critical, files and directories.
Any file and/or directory inside the work-directory is considered
safe-to-delete, meaning that it can safely be emptied when ServerPackCreator is not running, without running the risk of corrupting anything. It is not recommended to empty this directory whilst ServerPackCreator is running, as in that case, it may interfere with any currently running operation.By default, this is the
work-directory inside ServerPackCreators home-directory.
-
getInstallerCacheDirectory
final File getInstallerCacheDirectory()
Caching directory for various types of installers. Mainly used by the version-meta for caching modloaders server installers, but also used as the ServerPackCreator installer cache-directory in certain scenarios.
-
getTempDirectory
final File getTempDirectory()
Temp-directory storing files and folders required temporarily during the run of a server pack generation or other operations.
One example would be when running ServerPackCreator as a webservice and uploading a zipped modpack for the automatic creation of a server pack from said modpack.
Any file and/or directory inside the work-directory is considered
safe-to-delete, meaning that it can safely be emptied when ServerPackCreator is not running, without running the risk of corrupting anything. It is not recommended to empty this directory whilst ServerPackCreator is running, as in that case, it may interfere with any currently running operation.By default, this directory is
work/tempinside ServerPackCreators home-directory.
-
getModpacksDirectory
final File getModpacksDirectory()
Modpacks directory in which uploaded modpack ZIP-archives and extracted modpacks are stored.
By default, this is the
modpacks-directory inside thetemp-directory inside ServerPackCreators home-directory.
-
getServerFilesDirectory
final File getServerFilesDirectory()
Directory in which default server-files are stored in.
Default server-files are, for example, the
server.properties,server-icon.png,default_template.shanddefault_template.ps1.The properties and icon are placeholders and/or templates for the user to change to their liking, should they so desire. The script-templates serve as a one-size-fits-all template for supporting
Forge,Fabric,LegacyFabricandQuilt.By default, this directory is
server_filesinside ServerPackCreators home-directory.
-
getDefaultShellScriptTemplate
final File getDefaultShellScriptTemplate()
The default shell-template for the modded server start scripts. The file returned by this method does not represent the script-template in the
server_files-directory. If you wish access the configured script templates inside theserver_files-directory, usestartScriptTemplates.
-
getDefaultFishScriptTemplate
final File getDefaultFishScriptTemplate()
The default fish-template for the modded server start scripts. The file returned by this method does not represent the script-template in the
server_files-directory. If you wish access the configured script templates inside theserver_files-directory, usestartScriptTemplates.
-
getDefaultPowerShellScriptTemplate
final File getDefaultPowerShellScriptTemplate()
The default PowerShell-template for the modded server start scripts. The file returned by this method does not represent the script-template in the
server_files-directory. If you wish access the configured script templates inside theserver_files-directory, usestartScriptTemplates.
-
getDefaultBatchScriptTemplate
final File getDefaultBatchScriptTemplate()
The default Batch-template for the modded server start scripts. The file returned by this method does not represent the script-template in the
server_files-directory. If you wish access the configured script templates inside theserver_files-directory, usestartScriptTemplates.
-
getDefaultJavaShellScriptTemplate
final File getDefaultJavaShellScriptTemplate()
The default shell-template for the java-install scripts. The file returned by this method does not represent the script-template in the
server_files-directory. If you wish access the configured script templates inside theserver_files-directory, usejavaScriptTemplates.
-
getDefaultJavaFishScriptTemplate
final File getDefaultJavaFishScriptTemplate()
The default fish-template for the java-install scripts. The file returned by this method does not represent the script-template in the
server_files-directory. If you wish access the configured script templates inside theserver_files-directory, usejavaScriptTemplates.
-
getDefaultJavaPowerShellScriptTemplate
final File getDefaultJavaPowerShellScriptTemplate()
The default PowerShell-template for the java-install scripts. The file returned by this method does not represent the script-template in the
server_files-directory. If you wish access the configured script templates inside theserver_files-directory, usejavaScriptTemplates.
-
getDefaultJavaBatchScriptTemplate
final File getDefaultJavaBatchScriptTemplate()
The path a Batch template for the java-install scripts would have, if one existed.
Nothing is behind this path and nothing ever was. No
default_java_template.batships in the jar, none is staged intoserver_files, andScriptTemplatesConfigregisters nobatkey for Java installers - becausestart.batis a wrapper that runsstart.ps1, which sourcesinstall_java.ps1. Pointing ade.griefed.serverpackcreator.serverpack.java.template.batproperty at this file yields aninstall_java.batwith nothing in it.
-
getPropertiesDirectory
final File getPropertiesDirectory()
Directory in which the properties for quick selection are to be stored in and retrieved from.
-
getIconsDirectory
final File getIconsDirectory()
Directory in which the icons for quick selection are to be stored in and retrieved from.
-
getDefaultServerProperties
final File getDefaultServerProperties()
Default server.properties-file used by Minecraft servers. This file resides in the
server_files-directory inside ServerPackCreators home-directory.
-
getDefaultServerIcon
final File getDefaultServerIcon()
Default server-icon.png-file used by Minecraft servers. This file resides in the
server_files-directory inside ServerPackCreators home-directory.
-
getDefaultVariablesTemplate
final File getDefaultVariablesTemplate()
The
variables.txttemplate shipped with SPC, in theserver_files-directory inside its home-directory.Generation reads this file and substitutes its
SPC_..._SPCplaceholders per server pack, so the text an operator sees — the comments explaining every setting — is editable without rebuilding the API. It sits alongside the start-script templates because it is the same kind of thing: shipped content the user may adjust.
-
getPluginsDirectory
final File getPluginsDirectory()
Directory in which plugins for ServerPackCreator are to be placed in.
This directory not only holds any potential plugins for ServerPackCreator, but also contains the directory in which plugin-specific config-files are stored in, as well as the
disabled.txt-file, which allows a user to disable any installed plugin.By default, this is the
plugins-directory inside the ServerPackCreator home-directory.
-
getPluginsConfigsDirectory
final File getPluginsConfigsDirectory()
Directory in which plugin-specific configurations are stored in.
When ServerPackCreator starts and loads all available plugins, it will also extract a plugins config-file, if available. This file will be stored inside the config-directory using the ID of the plugin as its name, with
.tomlappended to it. Think of this like the config-directory in a modded Minecraft server. Do the names of the config-files there look familiar to the mods they belong to? Well, they should!By default, this is the
config-directory inside theplugins-directory inside ServerPackCreators home-directory.
-
defaultTomcatBaseDirectory
final File defaultTomcatBaseDirectory()
Where the web backend's Tomcat keeps its working files: always the home directory.
Landmine: the
tomcatBaseDirectorygetter resets a deviating stored value to this on read, so the GUI's dirty-check compares a raw widget against a normalised value and needs a reload after saving.
-
defaultServerPacksDirectory
final File defaultServerPacksDirectory()
Where generated packs go unless a configuration overrides the destination.
-
defaultTomcatLogsDirectory
final File defaultTomcatLogsDirectory()
Where the web backend logs, falling back when the configured location is not writable.
-
-
-
-