SaveDefaultConfig() not doing anything

Discussion in 'Plugin Development' started by MOMOTHEREAL, Feb 12, 2014.

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

    MOMOTHEREAL

    Hello guys!
    Alright, so I am working on a PvP plugin for a friend and I'm really annoyed by this:
    When I call this.saveDefaultConfig() on my onEnable(), the file is created but not its content. I've also tried to mess up with copying Defaults but still the same result. Here is my code in onEnable():
    Code:
    public void onEnable() {
           
            this.getServer().getPluginManager().registerEvents(new EventManager(), this);
            FFACommands.plugin = this;
            KitManager.plugin = this;
            PlayerManager.plugin = this;
           
            this.getCommand("ffa").setExecutor(new FFACommands());
            this.saveDefaultConfig();
            this.getConfig().options().copyDefaults(true);
            this.getLogger().info(Messages.ENABLED);
           
        }
    Thanks for reading and have a nice day :)
     
  2. Offline

    xTrollxDudex

    MOMOTHEREAL
    Note that this doesn't replace the current config, so you may need to delete the current one after updating the one in the jar.
     
Thread Status:
Not open for further replies.

Share This Page