Saving Defaults to Config

Discussion in 'Plugin Development' started by ibWill, Jul 15, 2014.

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

    ibWill

    Hello there!
    I have been developing plugins for a while now and I've never really had to have a pre-made config. I was able to get the config to copy over, but its all in one line. Any suggestions?

    Code:
    one:
      - 'two'
      - 2
      - 'too'
    three: 'Three'
    four: 'five'
    turns into this

    Code:
    one: - 'two' - 2 - 'too' three: 'Three' four: 'five'
     
  2. Offline

    Traks

    What code did you use to copy the contents of the plugin's local file to the external file?
     
  3. Offline

    Necrodoom

    Also make sure you are always looking at the files using a text editor that supports all line endings, such as notepad++.
     
    mythbusterma likes this.
  4. Offline

    ibWill

    I've used
    saveDefaultConfig();
    and
    getConfig().options().copyDefaults(true);
    saveConfig();
     
Thread Status:
Not open for further replies.

Share This Page