I need help with something. I have this code for config. And I want to add lines of comments (EG: #This string is ...), how do I do? Code (Text): config.addDefault("Messages.onJoinMessage", "&e%player% &7joined the game!");
You can't do it through the config API, you need to actually change the file. I think there was someone working on an API for adding comments in a config file based on a key so let me see if I can find it. @--TOMAS-- I don't think this was the one I remember but never the less it looks great and it seems the following for it is still active as is the dev. https://www.spigotmc.org/resources/yamler.315/
use saveDefaultConfig() method in onEnable to do it. With this method, you need to create config.yml right in your path where plugin.yml exists Type all vars with comments PROFIT