Class GenerationConfig

  • All Implemented Interfaces:

    
    public final class GenerationConfig
    
                        

    Settings-group for server pack generation: clientside-mod lists and their whitelist, directory in- and exclusions, pre- and post-install cleanup-files, ZIP-archive exclusions, the clientside-mod exclusion-filter, generation-flags and Aikar's flags. Extracted from ApiProperties (refactor Phase 1b); ApiProperties remains the facade through which consumers access these values.

    • Constructor Detail

    • Method Detail

      • getFallbackDirectoriesInclusion

         final TreeSet<String> getFallbackDirectoriesInclusion()

        Shipped default for what a new configuration copies out of a modpack. Sorted, so the config file it is written into stays diff-friendly. Every fallback* here is what SPC uses when the property is unset or unreadable, which is what keeps a damaged properties file from being fatal.

      • getFallbackAikarsFlags

         final String getFallbackAikarsFlags()

        Aikar's recommended JVM flags, offered as one click in the GUI rather than typed out by a user.

      • getFallbackUpdateProtectedPaths

         final TreeSet<String> getFallbackUpdateProtectedPaths()

        Shipped default for what an update must leave alone: everything a running Minecraft server writes into the directory it was started from, plus the two files an operator tunes by hand. A server pack is routinely run in place, so its directory stops being ServerPackCreator's the moment somebody starts a server out of it — regenerating over it must not cost them a world, their ban-list or their memory settings. Entries are matched against paths relative to the server pack, a directory covering everything beneath it.

      • getZipArchiveExclusions

         final TreeSet<String> getZipArchiveExclusions()

        Files to exclude from server pack ZIP-archives; store-entries merge with the fallback-defaults. The placeholders MINECRAFT_VERSION, MODLOADER and MODLOADER_VERSION are replaced during generation.

      • setZipArchiveExclusions

         final Unit setZipArchiveExclusions(TreeSet<String> value)

        Files to exclude from server pack ZIP-archives; store-entries merge with the fallback-defaults. The placeholders MINECRAFT_VERSION, MODLOADER and MODLOADER_VERSION are replaced during generation.

      • isAutoExcludingModsEnabled

         final Boolean isAutoExcludingModsEnabled()

        Whether auto-excluding of clientside-only mods is enabled. Reading migrates the legacy property-key to the current one, with the legacy value winning.

      • setAutoExcludingModsEnabled

         final Unit setAutoExcludingModsEnabled(Boolean value)

        Whether auto-excluding of clientside-only mods is enabled. Reading migrates the legacy property-key to the current one, with the legacy value winning.

      • getUpdateProtectedPaths

         final TreeSet<String> getUpdateProtectedPaths()

        Paths an update must never delete, overwrite or put into the ZIP-archive, matched against paths relative to the server pack, where a directory covers everything beneath it.

        Deliberately the union of fallbackUpdateProtectedPaths and whatever is configured, in both accessors: protection is additive, so a user can widen it and cannot — by editing a properties-file, by a half-written value, or by a settings-panel that saves a shorter list — end up with their own world unprotected. Somebody who genuinely wants a protected file regenerated has two ways to say so that leave no room for accident: turn updating off, or delete the file and let the next run write it fresh.

        Builds a new set on every read rather than handing out a field, for the reason clientsideModsRegex next door does: a caller holding the config's own collection watches it be emptied underneath them the next time anything reads the property.

      • setUpdateProtectedPaths

         final Unit setUpdateProtectedPaths(TreeSet<String> value)

        Paths an update must never delete, overwrite or put into the ZIP-archive, matched against paths relative to the server pack, where a directory covers everything beneath it.

        Deliberately the union of fallbackUpdateProtectedPaths and whatever is configured, in both accessors: protection is additive, so a user can widen it and cannot — by editing a properties-file, by a half-written value, or by a settings-panel that saves a shorter list — end up with their own world unprotected. Somebody who genuinely wants a protected file regenerated has two ways to say so that leave no room for accident: turn updating off, or delete the file and let the next run write it fresh.

        Builds a new set on every read rather than handing out a field, for the reason clientsideModsRegex next door does: a caller holding the config's own collection watches it be emptied underneath them the next time anything reads the property.

      • getAikarsFlags

         final String getAikarsFlags()

        Aikar's flags, commonly used for Minecraft servers to improve performance in various places.

      • setAikarsFlags

         final Unit setAikarsFlags(String value)

        Aikar's flags, commonly used for Minecraft servers to improve performance in various places.