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-version 2).
  • Migrating per-bag content from legacy JSON files to YAML with structured metadata (upgrade to config-version 4).
  • Renaming token settings from skin-token.* to token.skin.* (upgrade to config-version 5).
  • Restructuring flat config keys into hierarchical paths and creating a backup before changes (upgrade to config-version 6). See CV6_ConfigRestructure.
Conventions:
  • Each converter is guarded by a config-version check and aims to be idempotent.
  • Operations perform filesystem I/O and log progress, warnings, and errors.
  • Intended to run single-threaded during plugin initialization.
See also: CV2_BagConversion, CV4_DataConversion, CV5_TokenConfigConversion, CV6_ConfigRestructure, CV7_ConfigRestructure
  • Classes
    Class
    Description
    Performs 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-version is detected.
    Migrates legacy token configuration keys to the current schema when an outdated config-version is detected.
    Performs in-place restructuring of the HavenBags configuration when an older config-version is detected.
    Migrates config.yml in-place to config-version = 7.