Solved Comments Get Deleted From Config

Discussion in 'Spigot Plugin Development' started by GodzillaCodes, Jun 5, 2016.

Thread Status:
Not open for further replies.
  1. My Config File in Eclipse Has Comments But the config file in my plugin has like 3 lines of them and there all butchered.

    Eclipse Config
    http://pastebin.com/4Uw3CbUW

    Server Config
    http://pastebin.com/Ue46z07c

    It doesn't even save empty lines.

    Heres how i save my config
    Code (Text):
    if (!new File(getDataFolder(), "config.yml").exists()) {
               saveResource("config.yml", false);
        } else {
            saveConfig();
    }
    Im Not sure whats going wrong
     
  2. saveConfig will automatically format it to show without the comments.

    Use saveDefaultConfig
     
  3. Thanks!
     
Thread Status:
Not open for further replies.