Exlll / ConfigLib

A Minecraft library for saving, loading, updating, and commenting YAML configuration files
MIT License
135 stars 17 forks source link

Comments are not processed #7

Closed KorkugunuB closed 3 years ago

KorkugunuB commented 5 years ago

this is my config class: https://hastebin.com/ohawokisah.java this is output config file: https://hastebin.com/buzozaqefo.yml comment lines are not processed. what can I do about it ?

Exlll commented 5 years ago

Hi,

comments can only be added to top level fields. You can add a comment to the database field which describes its fields. Like so:

@Comment({
    "type: Database backend type, ....",
    "host: MySQL database host",
    "...."
})
private Database database;

Sorry, but this is due to limitations in the YAML library which doesn't actually support comments, so I don't know if or when I can add support for this.

The way you named your fields is pretty self-explanatory anyway, so I don't know if most of those comments add any real value to your configuration.