Save Config with comments?

Discussion in 'Plugin Development' started by The_Nesko, Apr 18, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    The_Nesko

    Hello all i had this problem for a while i have a config file in my jar and what i want to do is save the config in the onDisable() method but when i use save(); it only saves the values and the header comment and i have comments all over the config so how can i save it with comments?
     
  2. Offline

    Gonmarte

    Try saveDefaultConfig();
     
  3. Offline

    Lordloss

    Afaik this will just completely override all his values, because it copies the standard config into the plugin folder.
     
  4. Offline

    I Al Istannen

    @Lordloss
    It won't:
    from here. However it only works if the file isn't alread created and copies the default config file. You can't use it for anything else, I think it just uses something along the Lines of "Files#copy()".
     
Thread Status:
Not open for further replies.

Share This Page