-
- All Implemented Interfaces:
public abstract class ConfigMigrator
Migrates Spigot YAML configurations across versions.
-
-
Field Summary
Fields Modifier and Type Field Description private final List<NamedConfigMigration>
namedConfigMigrations
-
Constructor Summary
Constructors Constructor Description ConfigMigrator(File dataFolder, Boolean backupOnMigrate)
ConfigMigrator(File dataFolder)
-
Method Summary
Modifier and Type Method Description abstract List<NamedConfigMigration>
getNamedConfigMigrations()
Migrations that this instance will run through in the given order. final Unit
migrate()
Attempts to run all of the migrations that it is aware of. final Unit
writeYamlFromResourcesIfNotExists(String resource)
-
-
Method Detail
-
getNamedConfigMigrations
abstract List<NamedConfigMigration> getNamedConfigMigrations()
Migrations that this instance will run through in the given order.
-
migrate
final Unit migrate()
Attempts to run all of the migrations that it is aware of. Will not copy configurations from resources into dataFolder. Iterates through ConfigMigration sorted by name from namedConfigMigrations in order, finding any files that match ConfigMigration.fileGlobs with a matching ConfigMigration.fromVersion, and running applicable ConfigMigrationSteps.
-
writeYamlFromResourcesIfNotExists
final Unit writeYamlFromResourcesIfNotExists(String resource)
-
-
-
-