{"id":21155274,"url":"https://github.com/nlfmt/bukkitconfigfilehelper","last_synced_at":"2025-03-14T15:15:39.697Z","repository":{"id":130781338,"uuid":"526701696","full_name":"nlfmt/BukkitConfigFileHelper","owner":"nlfmt","description":"Provides easy access to YAML files using the Bukkit API","archived":false,"fork":false,"pushed_at":"2022-08-19T17:47:11.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-07T17:05:08.996Z","etag":null,"topics":["bukkit","papermc","spigot","yaml"],"latest_commit_sha":null,"homepage":"","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/nlfmt.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":"2022-08-19T17:47:04.000Z","updated_at":"2022-08-19T17:48:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"e33cf1cd-d9b1-43d6-bd44-f7f418b07d58","html_url":"https://github.com/nlfmt/BukkitConfigFileHelper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlfmt%2FBukkitConfigFileHelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlfmt%2FBukkitConfigFileHelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlfmt%2FBukkitConfigFileHelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlfmt%2FBukkitConfigFileHelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nlfmt","download_url":"https://codeload.github.com/nlfmt/BukkitConfigFileHelper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243597834,"owners_count":20316844,"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":["bukkit","papermc","spigot","yaml"],"created_at":"2024-11-20T11:17:16.637Z","updated_at":"2025-03-14T15:15:39.673Z","avatar_url":"https://github.com/nlfmt.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConfigFile - YAML Helper class for Bukkit/Spigot/Paper/...\n\nThis wrapper class allows easy access to YAML files from your Bukkit/Spigot/Paper/... plugin.\\\n\nEvery method is well-documented so you should be able to get started quickly\n\n## Setup\nThe only thing you need to get started is calling `setPlugin()` in your `onEnable` method.\n```java\nConfigFile.setPlugin(this);\n```\nThe ConfigFile needs the plugin to know where it can load resources from.\n\n## Config Types\nConfigFiles can have 3 types, `LOAD_AND_SAVE`, `LOAD_ONLY` and `SAVE_ONLY`. \\\n**\"Loading\"** means, that it is looking for default values in your plugin resource folder. \\\n**\"Saving\"** means, that you can call `save()` to write all values to a file in the plugin data folder.\n\n## Examples\n```java\n// Loads a config.yml datei from the folder \"folder\"\n// This constructor sets the type to ConfigFile.Type.LOAD_AND_SAVE\nConfigFile config = new ConfigFile(\"folder/config\");\n\n// Using the config works as always, since its just a YamlConfiguration underneath.\nconfig.set(\"Test\", 4);\nString test = config.getString(\"SomeDefaultValue\");\n\n// Save your changes to the data folder (the resource in you plugin's jar is not modified)\nconfig.save();\n\n// Delete the file from the plugin data folder\nconfig.delete();\n\n// If you dont have default values, you can change the type to SAVE_ONLY\nConfigFile data = new ConfigFile(\"data\", ConfigFile.Type.SAVE_ONLY);\ndata.set(\"data1\", \"test\");\ndata.save();\n\n// if you only want to load the defaults from the resource folder\n// and never save changes to the data folder, use LOAD_ONLY\nConfigFile defaults = new ConfigFile(\"defaults\", ConfigFile.Type.LOAD_ONLY);\nString value = defaults.getString(\"SomeValue\");\n```\n\n## Bugs \u0026 Improvements\nIf you found a bug, please open an Issue, explain it in detail and ideally add source code or error messages.\n\nIf you think this class can be improved, send me an email at nlfmt@gmx.de, or submit a pull request.\n\n## License\nYou're free to use the code in any way you want, altough I'd appreciate it if you mentioned me :)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlfmt%2Fbukkitconfigfilehelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnlfmt%2Fbukkitconfigfilehelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlfmt%2Fbukkitconfigfilehelper/lists"}