use of net.dzikoysk.funnyguilds.config.migration.P0001_Fix_freecam_compensation_key_case in project FunnyGuilds by FunnyGuilds.
the class ConfigurationFactory method createPluginConfiguration.
public PluginConfiguration createPluginConfiguration(File pluginConfigurationFile) {
return ConfigManager.create(PluginConfiguration.class, (it) -> {
it.withConfigurer(new OkaeriValidator(new YamlBukkitConfigurer(), true), new SerdesCommons());
it.withSerdesPack(registry -> {
registry.register(new RawStringTransformer());
registry.register(new MaterialTransformer());
registry.register(new ItemStackTransformer());
registry.register(new EntityTypeTransformer());
registry.register(new FunnyTimeTransformer());
registry.register(new RangeFormattingTransformer());
registry.register(new VectorSerializer());
});
it.withBindFile(pluginConfigurationFile);
it.withLogger(FunnyGuilds.getInstance().getLogger());
it.saveDefaults();
it.load(true);
it.migrate(new P0001_Fix_freecam_compensation_key_case(), new P0002_Migrate_old_heart_configuration(), new P0003_Migrate_old_tnt_protection_configuration(), new P0004_Migrate_tablist_into_separate_file(), new P0005_Fix_heart_configuration_centery_key());
});
}
Aggregations