config, copyDefaults?

Discussion in 'Plugin Development' started by SoThatsIt, Jun 14, 2013.

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

    SoThatsIt

    i have noticed there is a copyDefaults(boolean) method in the options for a fileConfiguration object. I have tried to use this so any values that are not present ill be placed there but it isn't working? i am using copyDefaults(true) but it isnt having any effects. So basically if i have a config like

    Code:
    fluffybunny: true
    and i create an update but in that update it also requires the config option

    Code:
    evilbunny: true
    how would i go about adding the evilbunny value
     
  2. Offline

    chasechocolate

    Are you calling saveConfig()? Also, there is an addDefault(path, key) method to add defaults, so you can add an evilbunny default value before saving defaults.
     
Thread Status:
Not open for further replies.

Share This Page