Solved ReloadConfig File

Discussion in 'Plugin Development' started by rawiuwt, Aug 21, 2013.

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

    rawiuwt

    How I delete config.yml,which in plugin folder,then save new config.yml from java to plugin folder.
    Thanks.
     
  2. rawiuwt
    Why would you delete it? Just clear the file.
     
  3. Offline

    rawiuwt

    Assist How can i clear it.
     
  4. rawiuwt
    Code:java
    1. for (String key: getConfig().getKeys(false)) {
    2. getConfig().set(key, null);
    3. }
    Or you could delete it.
    Code:java
    1. File file = new File(this.getDataFolder(), "config.yml");
    2. file.delete();

    Then just generate a new one.
     
Thread Status:
Not open for further replies.

Share This Page