Smart Copy Defaults

Discussion in 'Plugin Development' started by RcExtract, May 26, 2017.

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

    RcExtract

    How can I only add keys into the config.yml from the default config, and only remove keys that doesn't exist in the default config? I am confused on how getConfig().Options().copyDefaults(true) works.
     
  2. Offline

    MrGriefer_

    saveDefaultConfig(); ??!!! Is that what you mean? I don't understand, are you trying to add something in the config and remove it ?
     
  3. Offline

    Caderape2

    @RcExtract Like greifer said, you just have to put saveDefaultConfig() on your enable.
    the file will be created and copied from yourconfig.yml in your jar, and it will not override if the file already exist.
     
Thread Status:
Not open for further replies.

Share This Page