tchristofferson / Config-Updater

Used to update files for Bukkit/Spigot API
MIT License
66 stars 9 forks source link

What to put in #34

Closed kloppie74 closed 8 months ago

kloppie74 commented 8 months ago

ConfigUpdater.update(this, "Settings.yml", configFile, Arrays.asList(....));

What to place on the .... ?

tchristofferson commented 8 months ago

That is where ignored config sections go. Sometimes a user can add their own keys to the config and you don't want them to disappear. For example, if you have a default section like this:

items:
    item1:
        ...
    item2:
       ...

and a user changes it to this:

items:
    item1:
        ...
    item2:
       ...
    item3:
        ...

By default config updater will overwrite the second config back to the first. If you add "items" to the list of ignored sections the items section will not be overwritten back to default.