Class CV5_TokenConfigConversion

java.lang.Object
valorless.havenbags.configconversion.CV5_TokenConfigConversion

public class CV5_TokenConfigConversion extends Object
Migrates legacy token configuration keys to the current schema when an outdated config-version is detected. If the version is lower than 5, this converter will:
  • Set config-version to 5 and save the configuration.
  • Move legacy skin-token.* keys to the new token.skin.* namespace (material, custommodeldata, displayname, lore).
  • Remove the migrated legacy keys from the configuration.
Invocation is intended for internal use during plugin initialization.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    check(valorless.valorlessutils.config.Config config)
    Checks the provided configuration and, if config-version < 5, updates the configuration structure by moving skin-token.* keys into token.skin.*, removes the legacy keys, and persists the changes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CV5_TokenConfigConversion

      public CV5_TokenConfigConversion()
  • Method Details

    • check

      @DoNotCall("Internal Use Only") public static void check(@NotNull valorless.valorlessutils.config.Config config)
      Checks the provided configuration and, if config-version < 5, updates the configuration structure by moving skin-token.* keys into token.skin.*, removes the legacy keys, and persists the changes. The configuration's config-version is set to 5 before migration. Side effects:
      • Updates and saves the supplied configuration.
      • Renames configuration keys under the token settings.
      • Emits log messages describing the migration.
      Thread-safety: not thread-safe. Call during initialization only.
      Parameters:
      config - the non-null plugin configuration to inspect and migrate