save Config with Comments

Discussion in 'BungeeCord Plugin Development' started by Tanju42, Mar 26, 2020.

  1. Example Config:
    Code (YAML):
    # Sup dude

    # This is true when you are cool
    amicool
    : true

    # This is true when somone helped me and gave me a solution
    helped
    : false
    I want to save this Config with the "#".

    When thats not possible and I need a Costum FileConfiguration then give me an link for the API please.
     
  2. Thankx for the Links I have CostumConfigs (More then one) so saveDefaultConfig is not working for me.

    And I use BungeeCord so saveResource doesn't exists

    I load the Configs so:
    Code (Java):
    ConfigurationProvider.getProvider(YamlConfiguration.class).load(*File*);
    And save them so:
    Code (Java):
    ConfigurationProvider.getProvider(YamlConfiguration.class).save(config, *File*);
    When there is a better way you can show it to me :).
     
  3. You can make yourself a custom yaml file dumper in order to save comments. There's no other way.