So a while back in 2011 @dumptruckman made this: https://bukkit.org/threads/commente...ion-class-for-adding-comments-to-nodes.30889/ BACKSTORY Towny, which is one of the oldest plugins to date, (afaik almost as old as Worldguard), never stopped using the CommentedConfiguration and @LlmDl always made sure it was updated and working. Recently I joined the Towny project and took care of many different things, at some point we also tweaked the CommentedConfiguration to hold strings longer than 80 chars in 1 line and a ton of other stuff. I with permission from both dumptruckman and LLmdl have decided to post about it. ACTUAL STUFF What even is a CommentedConfiguration? With this configuration system you can programatically (so in your IDE) setup your config and can read different values very easily , it also generates your configuration automatically and handles simple updates. PROS - Very Easy To Use once Implemented - Not Tedious - Requires no more config.yml to be included in your JAR (in your maven resources) - Nor do you need to write the config.yml in yaml and learn YML formatting. - Pretty much updates itself whenever something is added. - Handles comments and default values without problems. CONS - Shouldn't be used for auto-generating configs (it's possible but it defeats the purpose of using this) - Skips a line which looks a little stupid (searching for a fix): http://prntscr.com/k4pvui Temporary Fix: Adding a "\n" to the end of a line will result it them following each other directly, found by @Twan040 Permanent Fix: has been implemented, if you are using the old version, copy FileMgmt again! - 1 line is skipped at the start of the config. Permanent Fix: has been implemented, if you are using the old version, copy CommentedConfiguraton again. - Makes the startup a little longer (not really noticeable) - Doesn't have real-time updates (?) HOW DOES IT WORK (roughly): It reads the file into JAVA (if it doesn't exist it just reads an empty file). It checks for every single node in the Enum you specified for that file, if that enum exists it does nothing and just copies it into a new config-object which is kept in memory. It that enum doesn't exist (at this point they are config sections) it creates it and also reads it into memory. So pretty much your entire config is stored in memory and can then be read. OTHER INFORMATION: In the past the CommentedConfiguration used to be very very similar to the YAMLConfiguration in Bukkit, I changed that a while ago so we could have lines longer than 80 chars and not have them wrap. HOW DOES ONE IMPLEMENT WIZARDRY? So pretty much we will need 4 class files: - ConfigEnum (Contains all the options, their default value, yaml path (section) and comments) - CommentedConfiguration (Is the object this can just be copied over or you can use it from someone else's maven dependency) - ConfigurationHandler (Handles config loading and saving, auto-generation and contains the methods to get options) - FileMgmt (Contains basic file managing methods, you can also use it from someone else's maven dependency) Once you have all of that copied and there are no missing classes, you just need to add the onEnable from MainClass.java to your Main Class. NEW: MAVEN INTEGRATION Thanks to some help from @creatorfromhell I have managed to create a maven-dependency for CommentedConfigurations which will allow the creation of an entirely custom CommentedConfiguration by pretty much 1 line of code and 1 Enum. Extensively if you want to have self-generating configs so data storage in configs (usually the case) then you can add an extra class. Code (Text): <repository> <id>articdive-repo</id> <url>https://ci.articdive.cf/plugin/repository/everything/</url> </repository> <dependency> <groupId>de.articdive</groupId> <artifactId>CommentedConfiguration</artifactId> <version>2.0-RELEASE</version> <scope>compile</scope> </dependency> The Gist contains examples for your Nodes file and what you need to type in your on Enable: Maven Gist: https://gist.github.com/Articdive/73fa1b408d3a6440c29631b2dbbdabdc Here is the Main Gist: https://gist.github.com/Articdive/7edd4d8c420fc5c6aa8ff88d92256be1 Please note in the GISTs I kept some values from my projects (in the ConfigNodes e.t.c) it's all just an example! IMPORTANT NOTES: I personally like to make ConfigurationHandler a static class which means you initialise it at the start THIS IS NOT NECESSARY! Towny instantiates it aswell! Please remember to initialise FileMgmt in your onEnable though, you could instantiate it but that is down to you. FIN: This is my first ever post on the Spigot Forums, I hope you guys enjoyed, if you have any suggestions, fixes or just want to leave a Thank You, Feel Free!