@Component
public final class ApplicationProperties
extends java.util.Properties
Properties. Sets up default properties loaded
from the local serverpackcreator.properties and allows reloading of said properties if the file
has changed.| Modifier and Type | Class and Description |
|---|---|
static class |
ApplicationProperties.ExclusionFilter |
| Constructor and Description |
|---|
ApplicationProperties()
Initialize an instance of our application properties using the default
serverpackcreator.properties. |
ApplicationProperties(java.io.File propertiesFile)
Initialize an instance of our application properties using a custom properties-file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDirectoryToExclude(java.lang.String entry)
Adder for the list of directories to exclude from server packs.
|
boolean |
checkForAvailablePreReleases()
Getter for whether the search for available PreReleases is enabled or disabled.
Depending on de.griefed.serverpackcreator.versioncheck.prerelease, returns
true if checks for available PreReleases are enabled, false if no checks
for available PreReleases should be made. |
java.io.File |
DEFAULT_CONFIG()
Default configuration-file for a server pack generation.
|
java.io.File |
DEFAULT_POWERSHELL_TEMPLATE() |
java.io.File |
DEFAULT_SERVER_ICON()
Default server-icon.png-file used by Minecraft servers.
|
java.io.File |
DEFAULT_SERVER_PROPERTIES()
Default server.properties-file used by Minecraft servers.
|
java.io.File |
DEFAULT_SHELL_TEMPLATE() |
java.lang.String |
DIRECTORY_PLUGINS()
Directory where plugins are stored in.
|
java.lang.String |
DIRECTORY_SERVER_FILES()
Directory where server-files are stored in, for example the default server-icon and
server.properties.
|
boolean |
enableMinecraftPreReleases()
Whether Minecraft pre-releases and snapshots are available to the user in, for example, the
GUI.
|
ApplicationProperties.ExclusionFilter |
exclusionFilter()
The filter method with which to determine whether a user-specified clientside-only mod should
be excluded from the server pack.
|
java.io.File |
FABRIC_INSTALLER_VERSION_MANIFEST_LOCATION()
Path to the Fabric installer version manifest-file, as a file.
|
java.io.File |
FABRIC_INSTALLER_VERSION_MANIFEST()
Fabric installer version manifest-file.
|
java.io.File |
FABRIC_INTERMEDIARIES_MANIFEST_LOCATION()
Path to the Fabric intermediaries manifest-file, as a file.
|
java.io.File |
FABRIC_VERSION_MANIFEST_LOCATION()
Path to the Fabric version manifest-file, as a file.
|
java.io.File |
FABRIC_VERSION_MANIFEST()
Fabric version manifest-file.
|
java.util.List<java.lang.String> |
FALLBACK_CLIENTSIDE_MODS()
List of fallback clientside-only mods.
|
java.util.List<java.lang.String> |
FALLBACK_REGEX_CLIENTSIDE_MODS()
Regex-list of fallback clientside-only mods.
|
java.util.List<java.io.File> |
FALLBACK_SCRIPT_TEMPLATES()
Default list of script templates, used in case not a single one was configured.
|
java.io.File |
FORGE_VERSION_MANIFEST_LOCATION()
Path to the Forge version manifest-file, as a file.
|
java.io.File |
FORGE_VERSION_MANIFEST()
Forge version manifest-file.
|
java.lang.String |
getAikarsFlags()
Get this configurations AikarsFlags
|
java.util.List<java.lang.String> |
getDefaultListFallbackMods()
Acquire the default fallback list of clientside-only mods.
|
java.util.List<java.lang.String> |
getDirectoriesToExclude()
Getter for the list of directories to exclude from server packs.
|
java.util.List<java.lang.String> |
getDirectoriesToInclude()
Getter for the default list of directories to include in a server pack.
|
java.lang.String |
getDirectoryServerPacks()
Getter for the directory in which the server packs are stored/generated in.
|
java.util.List<java.lang.String> |
getFilesToExcludeFromZipArchive()
List of files to be excluded from ZIP-archives.
|
java.lang.String |
getHasteBinServerUrl()
Acquire this instances HasteBin server documents endpoint URL.
|
java.lang.String |
getLanguage()
Get the currently set language.
|
java.util.List<java.lang.String> |
getListFallbackMods()
Acquire the default fallback list of clientside-only mods.
|
java.util.List<java.lang.String> |
getListFallbackModsRegex()
Getter for the regex fallback list of clientside-only mods.
|
int |
getQueueMaxDiskUsage()
Getter for the maximum disk usage at which JMS/Artemis will stop storing queues on disk.
|
boolean |
getSaveLoadedConfiguration()
Getter for whether the last loaded configuration file should be saved to as well.
|
boolean |
isAutoExcludingModsEnabled()
Is auto excluding of clientside-only mods enabled.
|
boolean |
isDarkTheme()
Is the Dark Theme currently active?
|
boolean |
isServerPackCleanupEnabled()
Whether cleanup procedures after server pack generation are enabled.
|
boolean |
isServerPacksOverwriteEnabled()
Whether overwriting of already existing server packs is enabled.
|
boolean |
isZipFileExclusionEnabled()
Whether the exclusion of files from the ZIP-archive of the server pack is enabled.
|
java.io.File |
LEGACY_FABRIC_GAME_MANIFEST_LOCATION()
Path to the Legacy Fabric Game version manifest-file, as a file.
|
java.io.File |
LEGACY_FABRIC_GAME_MANIFEST()
Legacy Fabric Game version manifest-file.
|
java.io.File |
LEGACY_FABRIC_INSTALLER_MANIFEST_LOCATION()
Path to the Legacy Fabric Installer version manifest-file, as a file.
|
java.io.File |
LEGACY_FABRIC_INSTALLER_MANIFEST()
Legacy Fabric Installer version manifest-file.
|
java.io.File |
LEGACY_FABRIC_LOADER_MANIFEST_LOCATION()
Path to the Legacy Fabric Loader version manifest-file, as a file.
|
java.io.File |
LEGACY_FABRIC_LOADER_MANIFEST()
Legacy Fabric Loader version manifest-file.
|
java.io.File |
MINECRAFT_VERSION_MANIFEST_LOCATION()
Path to the Minecraft version manifest-file, as a file.
|
java.io.File |
MINECRAFT_VERSION_MANIFEST()
Minecraft version manifest-file.
|
java.io.File |
QUILT_INSTALLER_VERSION_MANIFEST_LOCATION()
Path to the Quilt installer version manifest-file, as a file.
|
java.io.File |
QUILT_INSTALLER_VERSION_MANIFEST()
Quilt installer version manifest-file.
|
java.io.File |
QUILT_VERSION_MANIFEST_LOCATION()
Path to the Quilt version manifest-file, as a file.
|
java.io.File |
QUILT_VERSION_MANIFEST()
Quilt version manifest-file.
|
void |
reload()
Reload serverpackcreator.properties.
|
void |
saveToDisk(java.io.File propertiesFile)
Store the ApplicationProperties to disk, overwriting the existing one.
|
java.util.List<java.io.File> |
scriptTemplates()
Configured list of script templates.
|
java.io.File |
SERVERPACKCREATOR_DATABASE()
ServerPackCreator-database when running as a webservice.
|
java.io.File |
SERVERPACKCREATOR_PROPERTIES()
Properties file used by ServerPackCreator, containing the configuration for this instance of
it.
|
java.lang.String |
SERVERPACKCREATOR_VERSION()
Getter for the version of ServerPackCreator.
If a JAR-file compiled from a release-job from a CI/CD-pipeline is used, it should contain a VERSION.txt-file which contains the version of said release. |
void |
setTheme(boolean dark)
Set the current theme to Dark Theme or Light Theme.
|
java.lang.String[] |
SUPPORTED_MODLOADERS()
String-array of modloaders supported by ServerPackCreator.
|
boolean |
updateFallback()
Update the fallback clientside-only modlist of our
serverpackcreator.properties
from the main-repository or one of its mirrors. |
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNamesclear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values@Autowired public ApplicationProperties()
serverpackcreator.properties.public ApplicationProperties(java.io.File propertiesFile)
propertiesFile - The properties file from which to load the settings and configuration.public void reload()
public java.util.List<java.io.File> FALLBACK_SCRIPT_TEMPLATES()
public java.io.File DEFAULT_SHELL_TEMPLATE()
public java.io.File DEFAULT_POWERSHELL_TEMPLATE()
public java.util.List<java.io.File> scriptTemplates()
public java.io.File SERVERPACKCREATOR_PROPERTIES()
public java.util.List<java.lang.String> FALLBACK_CLIENTSIDE_MODS()
public java.util.List<java.lang.String> FALLBACK_REGEX_CLIENTSIDE_MODS()
public java.io.File DEFAULT_CONFIG()
public java.io.File DEFAULT_SERVER_PROPERTIES()
public java.io.File DEFAULT_SERVER_ICON()
public java.io.File MINECRAFT_VERSION_MANIFEST()
public java.io.File FORGE_VERSION_MANIFEST()
public java.io.File FABRIC_VERSION_MANIFEST()
public java.io.File FABRIC_INSTALLER_VERSION_MANIFEST()
public java.io.File QUILT_VERSION_MANIFEST()
public java.io.File QUILT_INSTALLER_VERSION_MANIFEST()
public java.io.File SERVERPACKCREATOR_DATABASE()
public java.io.File MINECRAFT_VERSION_MANIFEST_LOCATION()
public java.io.File FORGE_VERSION_MANIFEST_LOCATION()
public java.io.File FABRIC_VERSION_MANIFEST_LOCATION()
public java.io.File FABRIC_INTERMEDIARIES_MANIFEST_LOCATION()
public java.io.File FABRIC_INSTALLER_VERSION_MANIFEST_LOCATION()
public java.io.File QUILT_VERSION_MANIFEST_LOCATION()
public java.io.File QUILT_INSTALLER_VERSION_MANIFEST_LOCATION()
public java.io.File LEGACY_FABRIC_GAME_MANIFEST()
public java.io.File LEGACY_FABRIC_LOADER_MANIFEST()
public java.io.File LEGACY_FABRIC_INSTALLER_MANIFEST()
public java.io.File LEGACY_FABRIC_GAME_MANIFEST_LOCATION()
public java.io.File LEGACY_FABRIC_LOADER_MANIFEST_LOCATION()
public java.io.File LEGACY_FABRIC_INSTALLER_MANIFEST_LOCATION()
public java.lang.String SERVERPACKCREATOR_VERSION()
dev.public java.lang.String[] SUPPORTED_MODLOADERS()
public java.lang.String DIRECTORY_SERVER_FILES()
public java.lang.String DIRECTORY_PLUGINS()
public java.lang.String getDirectoryServerPacks()
public java.util.List<java.lang.String> getDefaultListFallbackMods()
public java.util.List<java.lang.String> getListFallbackMods()
de.griefed.serverpackcreator.serverpack.autodiscovery.filter is set to
ApplicationProperties.ExclusionFilter.REGEX, a regex fallback list is returned.public java.util.List<java.lang.String> getListFallbackModsRegex()
public java.util.List<java.lang.String> getDirectoriesToInclude()
public java.util.List<java.lang.String> getDirectoriesToExclude()
public void addDirectoryToExclude(java.lang.String entry)
entry - The directory to add to the list of directories to exclude from server packs.public boolean getSaveLoadedConfiguration()
public int getQueueMaxDiskUsage()
public boolean checkForAvailablePreReleases()
de.griefed.serverpackcreator.versioncheck.prerelease, returns
true if checks for available PreReleases are enabled, false if no checks
for available PreReleases should be made.public java.lang.String getAikarsFlags()
public java.util.List<java.lang.String> getFilesToExcludeFromZipArchive()
MINECRAFT_VERSION - Will be replaced with the Minecraft version of the
server pack
MODLOADER - Will be replaced with the modloader of the server pack
MODLOADER_VERSION - Will be replaced with the modloader version of the
server pack
Should you want these filters to be expanded, open an issue on GitHub
public boolean isZipFileExclusionEnabled()
true if the exclusion is enabled.public boolean isAutoExcludingModsEnabled()
true if autodiscovery is enabled.public boolean updateFallback()
serverpackcreator.properties
from the main-repository or one of its mirrors.true if the fallback-property was updated.public boolean isDarkTheme()
true if the Dark Theme is active, otherwise false.public void setTheme(boolean dark)
dark - true to activate Dark Theme, false otherwise.public void saveToDisk(java.io.File propertiesFile)
propertiesFile - The file to store the properties to.public boolean isServerPacksOverwriteEnabled()
true if it is enabled.public boolean isServerPackCleanupEnabled()
true if it is enabled.public java.lang.String getLanguage()
public java.lang.String getHasteBinServerUrl()
public boolean enableMinecraftPreReleases()
true if they are available.public ApplicationProperties.ExclusionFilter exclusionFilter()