{"id":15174219,"url":"https://github.com/toberocat/configmigrator","last_synced_at":"2026-02-18T16:31:29.742Z","repository":{"id":249385649,"uuid":"831368182","full_name":"ToberoCat/ConfigMigrator","owner":"ToberoCat","description":"Automates configuration file updates for Bukkit plugins, including version checks, backups, and migrations, while preserving custom settings and comments.","archived":false,"fork":false,"pushed_at":"2024-07-22T12:13:03.000Z","size":82,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-31T10:14:38.879Z","etag":null,"topics":["automation","backup","bukkit","bukkit-plugin","bukkitdev","configuration-management","devops","java","java-8","minecraft","open-source","plugin-development","spigot","yaml","yaml-configuration"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ToberoCat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-20T10:54:20.000Z","updated_at":"2024-11-26T07:09:24.000Z","dependencies_parsed_at":"2024-07-22T13:42:37.671Z","dependency_job_id":null,"html_url":"https://github.com/ToberoCat/ConfigMigrator","commit_stats":{"total_commits":7,"total_committers":1,"mean_commits":7.0,"dds":0.0,"last_synced_commit":"932637673849f45d5a45ad5947f2db6c0fe15e65"},"previous_names":["toberocat/configmigrator"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToberoCat%2FConfigMigrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToberoCat%2FConfigMigrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToberoCat%2FConfigMigrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ToberoCat%2FConfigMigrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ToberoCat","download_url":"https://codeload.github.com/ToberoCat/ConfigMigrator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239887314,"owners_count":19713632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","backup","bukkit","bukkit-plugin","bukkitdev","configuration-management","devops","java","java-8","minecraft","open-source","plugin-development","spigot","yaml","yaml-configuration"],"created_at":"2024-09-27T11:41:11.183Z","updated_at":"2025-10-15T18:45:21.807Z","avatar_url":"https://github.com/ToberoCat.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConfigMigrator\n\nConfigMigrator is a tool designed to help in the process of updating plugin configuration files for Bukkit plugins. It\nensures your configuration files are always up-to-date by handling version checks, backups, and migration processes.\n\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/toberocat/ConfigMigrator)\n![GitHub issues](https://img.shields.io/github/issues/toberocat/ConfigMigrator)\n![GitHub license](https://img.shields.io/github/license/toberocat/ConfigMigrator)\n[![](https://jitpack.io/v/ToberoCat/ConfigMigrator.svg)](https://jitpack.io/#ToberoCat/ConfigMigrator)\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n    - [Gradle](#gradle)\n    - [Maven](#maven)\n- [Usage](#usage)\n- [How it works](#how-it-works)\n- [Documentation](#documentation)\n- [Contributing](#contributing)\n- [License](#license)\n- [Acknowledgments](#acknowledgments)\n\n## Features\n\n- Automatically checks and updates configuration files.\n- Creates backups of existing configurations before migration.\n- Preserves existing configuration values during updates.\n- Comments in config will be copied to the new file.\n- Supports all YAML features, including lists, maps, and nested structures.\n\n## Installation\n\nConfigMigrator is distributed via JitPack. To include it in your project, add the following to your build configuration:\n\n### Gradle\n\n1. Add the JitPack repository to your `build.gradle` file:\n\n    ```groovy\n    repositories {\n        maven { url 'https://jitpack.io' }\n    }\n    ```\n\n2. Add the dependency:\n\n    ```groovy\n    dependencies {\n        implementation 'com.github.ToberoCat:ConfigMigrator:Tag'\n    }\n    ```\n\n   Replace **`Tag`** with the version you want to use.\n\n### Maven\n\n1. Add the JitPack repository to your `pom.xml` file:\n\n    ```xml\n    \u003crepositories\u003e\n        \u003crepository\u003e\n            \u003cid\u003ejitpack.io\u003c/id\u003e\n            \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n        \u003c/repository\u003e\n    \u003c/repositories\u003e\n    ```\n\n2. Add the dependency:\n\n    ```xml\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.github.ToberoCat\u003c/groupId\u003e\n        \u003cartifactId\u003eConfigMigrator\u003c/artifactId\u003e\n        \u003cversion\u003eTag\u003c/version\u003e\n    \u003c/dependency\u003e\n    ```\n\n   Replace **`Tag`** with the version you want to use.\n\n## Usage\n\nTo use ConfigMigrator in your Bukkit plugin, follow these steps:\n\n1. Ensure you have a `config.yml` file in your plugin's resources.\n\n2. Create an instance of `ConfigMigrator` and initiate the migration process in your plugin's main class:\n\n    ```java\n    import io.github.toberocat.configmigrator.ConfigMigrator;\n    import org.bukkit.plugin.java.JavaPlugin;\n\n    public class MyPlugin extends JavaPlugin {\n        @Override\n        public void onEnable() {\n            ConfigMigrator migrator = new ConfigMigrator(this);\n            migrator.migrate();\n        }\n    }\n    ```\n\n## How it works\n\nConfigMigrator will take the config.yml in your plugin resources and will expect it to be the latest version. For\nConfigMigrator to work properly, the config.yml must have the property `config-version` (By default). This will be used\nto check if a config file is outdated.\n\nAlways make sure to increase the config-version in the config.yml located in the resources folder when the config\nchanged.\n\nExample `config.yml`:\n\n```yaml\nconfig-version: 1\nsetting1: value1\nsetting2: value2\n```\n\n## Documentation\n\n### Class: `ConfigMigrator`\n\n#### Properties\n\n- `plugin: JavaPlugin`: The JavaPlugin instance for which the configuration is being migrated.\n- `configVersionPath: String`: The path within the configuration file where the version number is stored. Default\n  is `\"config-version\"`.\n- `backupPath: String`: The directory path where backups of the configuration are stored before migration. Default\n  is `\"backups/configs\"`.\n- `makeBackup: Boolean`: Determines whether a backup of the configuration should be made before migration. Default\n  is `true`.\n\n#### Methods\n\n- `boolean migrate()`: Initiates the migration process if necessary. Returns `true` if a migration occurred, `false`\n  otherwise.\n- `int getLatestVersion()`: Retrieves the latest configuration version number from the latest configuration file.\n- `int getInstalledVersion()`: Retrieves the currently installed configuration version number from the plugin's\n  configuration.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request or open an Issue on GitHub.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\nThanks to all the developers who contribute to open-source projects.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoberocat%2Fconfigmigrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoberocat%2Fconfigmigrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoberocat%2Fconfigmigrator/lists"}