Default configuration help.

Discussion in 'Plugin Development' started by krizzdawg, Feb 16, 2017.

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

    krizzdawg

    Code:
            i.getConfig().options().copyDefaults(true);       
            i.getConfig().addDefault("test", "test");
    
           
            i.saveDefaultConfig();
    
    This is not adding "test: test" to the config.
     
  2. Offline

    Zombie_Striker

    @krizzdawg
    That is because saveDefaultConfig restores all the original values in the plugin's jar, not saves values. Use saveConfig to save changes.
     
  3. Offline

    krizzdawg

    When I do that, my in-config messages get removed... such ass "#Configuration made by KrizzDawg".
     
  4. Offline

    Zombie_Striker

Thread Status:
Not open for further replies.

Share This Page