Class CV5_TokenConfigConversion
java.lang.Object
valorless.havenbags.configconversion.CV5_TokenConfigConversion
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-versionto5and save the configuration. - Move legacy
skin-token.*keys to the newtoken.skin.*namespace (material, custommodeldata, displayname, lore). - Remove the migrated legacy keys from the configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheck(valorless.valorlessutils.config.Config config) Checks the provided configuration and, ifconfig-version < 5, updates the configuration structure by movingskin-token.*keys intotoken.skin.*, removes the legacy keys, and persists the changes.
-
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, ifconfig-version < 5, updates the configuration structure by movingskin-token.*keys intotoken.skin.*, removes the legacy keys, and persists the changes. The configuration'sconfig-versionis set to5before migration. Side effects:- Updates and saves the supplied configuration.
- Renames configuration keys under the token settings.
- Emits log messages describing the migration.
- Parameters:
config- the non-null plugin configuration to inspect and migrate
-