Package valorless.havenbags.configconversion
package valorless.havenbags.configconversion
Provides versioned, one-shot migration utilities for HavenBags configuration
and data. Converters run during plugin startup when an older
config-version is detected and are not intended for direct use.
Responsibilities include:
- Renaming bag directories from player names to UUIDs (upgrade to
config-version2). - Migrating per-bag content from legacy JSON files to YAML with
structured metadata (upgrade to
config-version4). - Renaming token settings from
skin-token.*totoken.skin.*(upgrade toconfig-version5). - Restructuring flat config keys into hierarchical paths and creating
a backup before changes (upgrade to
config-version6). SeeCV6_ConfigRestructure.
- Each converter is guarded by a
config-versioncheck and aims to be idempotent. - Operations perform filesystem I/O and log progress, warnings, and errors.
- Intended to run single-threaded during plugin initialization.
CV2_BagConversion,
CV4_DataConversion,
CV5_TokenConfigConversion,
CV6_ConfigRestructure,
CV7_ConfigRestructure-
ClassesClassDescriptionPerforms migration of legacy HavenBags player bag directories to the current format.Handles migration of HavenBags per-bag data from legacy JSON files to the current YAML-based format when an outdated
config-versionis detected.Migrates legacy token configuration keys to the current schema when an outdatedconfig-versionis detected.Performs in-place restructuring of the HavenBags configuration when an olderconfig-versionis detected.Migratesconfig.ymlin-place toconfig-version = 7.