{"id":17260275,"url":"https://github.com/rubbaboy/confighelper","last_synced_at":"2025-07-30T03:33:55.956Z","repository":{"id":104690555,"uuid":"111349593","full_name":"RubbaBoy/ConfigHelper","owner":"RubbaBoy","description":"Provides an easy to use API to make custom Spigot configs, with other features.","archived":false,"fork":false,"pushed_at":"2019-03-28T03:45:45.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-26T09:46:34.639Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RubbaBoy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-11-20T01:56:20.000Z","updated_at":"2019-03-28T03:45:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"6a855f7c-2c0e-42f1-a869-99b9ad126cf6","html_url":"https://github.com/RubbaBoy/ConfigHelper","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/RubbaBoy/ConfigHelper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubbaBoy%2FConfigHelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubbaBoy%2FConfigHelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubbaBoy%2FConfigHelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubbaBoy%2FConfigHelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RubbaBoy","download_url":"https://codeload.github.com/RubbaBoy/ConfigHelper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubbaBoy%2FConfigHelper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267803984,"owners_count":24146527,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-15T07:47:44.451Z","updated_at":"2025-07-30T03:33:55.129Z","avatar_url":"https://github.com/RubbaBoy.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConfigHelper\nProvides an easy to use API to make custom Spigot configs, with other features.\n\n\n## Features\n+ Easy to use custom/default config generator\n+ Infividual config and default options\n+ Auto save\n+ Auto reload\n+ Annotation-bound config getters\n\n## Obtaining\n**Note:** My repo is currently down due due to ***severe*** spamming of requests (Contact me for details if interested in more of why), I may put it back up later on, or find another way of distributing the project.\n\nYou can use CommandHelper with Gradle or Maven. An example of the Gradle declaration:\n\n```groovy\nrepositories {\n    maven { url \"http://repo.rubbaboy.me/Minecraft/\" }\n}\n\ndependencies {\n    compile(group: 'com.uddernetworks.config', name: 'ConfigHelper', version: '1.1-SNAPSHOT')\n}\n```\n\nAn example of Maven usage:\n```xml\n\u003crepositories\u003e\t\n        \u003crepository\u003e\t\n            \u003cid\u003erubbaboy-plugins\u003c/id\u003e\t\n            \u003curl\u003ehttp://repo.rubbaboy.me/Minecraft/\u003c/url\u003e\t\n        \u003c/repository\u003e\n\u003c/repositories\u003e\n\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.uddernetworks.config\u003c/groupId\u003e\n        \u003cartifactId\u003eConfigHelper\u003c/artifactId\u003e\n        \u003cversion\u003e1.1-SNAPSHOT\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n## How To Use\nFor reference of any methods, please check the [JavaDoc](https://rubbaboy.me/confighelp/).\n\n### Default options\nOptions for configs can be set as default, incase you want to make many configs with the same options.\n```Java\nConfig.getDefaultOptions()\n        .enableAutoReload(true)\n        .enableAutoSave(true)\n        .setDefaultLocation(getDataFolder());\n```\n\n### Creating a Config object\nTo start using the API you need to get a Config object. Leave the config name blank to set it as the default `config.yml` file. Setting options are not required, and override default options set above, if set.\n```Java\nConfig customConfig = new Config(\"customconfig.yml\");\ncustomConfig.getOptions().setDefaults(\"customconfig.yml\");\ncustomConfig.initialize();\n```\n\n### Setting objects\nSetting things and getting thigns is the same as a standard config. Here's an example of setting a string to the path `my.example.path`\n```Java\ncustomConfig.set(\"my.example.path\", \"Example message!\");\n```\n\n### Using annotation-bound getters\nAnnotation-bound getters are meant for very fast retrieval of objects from a config. Due to how Java works, these values can only be fetched, and do not update when the config is externally modified.\nTo use annotation-bound getters, first you need to register the class with the annotations in it, with `this` as its parameter, to get an instance of the class.\n```Java\nConfig.registerAnnotatedClass(this);\n```\n\nNext, you need to set the actual variable. This should be outside of any method, and accepts a `path` to the value, and (If needed) a config file name (With .yml extension). If you need to use the default config, don't set a `config` argument. Set this variable equal to whatever its default value should be if the path is not found/set in the specified config. These can be any object, not just a string.\n```Java\n@ConfigSync(config = \"customconfig.yml\", path = \"my.example.path\")\nprivate String syncedOtherWelcomeMessage = \"A default message!\";\n```\n\n## Full example class\nHere is a full example class, to show the functionality of the API.\n```Java\npublic class Main extends JavaPlugin {\n\n    @ConfigSync(path = \"my.welcome.message\")\n    private String syncedWelcomeMessage = \"Default welcome message!\"; // In the config `config.yml` the path `my.welcome.message` says: \"Welcome User!\"\n\n    @ConfigSync(path = \"not.existant\")\n    private String nonExistantThing = \"DEFAULT\";\n\n    @ConfigSync(config = \"customconfig.yml\", path = \"my.other.welcome.message\")\n    private String syncedOtherWelcomeMessage = \"Another default welcome message!\"; // In the config `customconfig.yml` the path `my.other.welcome.message` says: \"Sup Dude!\"\n\n    @Override\n    public void onEnable() {\n        Config.registerAnnotatedClass(this);\n\n        Config.getDefaultOptions()\n                .enableAutoReload(true)\n                .enableAutoSave(true)\n                .setDefaultLocation(getDataFolder());\n\n        Config defaultConfig = new Config();\n        defaultConfig.getOptions().setDefaults(\"config.yml\");\n        defaultConfig.initialize();\n\n        Config customConfig = new Config(\"customconfig.yml\");\n        customConfig.getOptions().setDefaults(\"customconfig.yml\");\n        customConfig.initialize();\n\n        System.out.println(\"syncedWelcomeMessage = \" + syncedWelcomeMessage); // Outputs \"Welcome User!\"\n        System.out.println(\"syncedOtherWelcomeMessage = \" + syncedOtherWelcomeMessage); // Outputs \"Sup Dude!\"\n\n\n        defaultConfig.set(\"my.welcome.message\", \"Huh hope this works\");\n        customConfig.set(\"my.other.welcome.message\", \"Wow it really worked!\");\n\n\n        System.out.println(\"syncedWelcomeMessage = \" + syncedWelcomeMessage); // Outputs \"Huh hope this works\"\n        System.out.println(\"syncedOtherWelcomeMessage = \" + syncedOtherWelcomeMessage); // Outputs \"Wow it really worked!\"\n        System.out.println(\"nonExistantThing = \" + nonExistantThing); // Outputs \"DEFAULT\"\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubbaboy%2Fconfighelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubbaboy%2Fconfighelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubbaboy%2Fconfighelper/lists"}