Solved config.yml doesn't copy commented lines

Discussion in 'Plugin Development' started by michaelkrauty, Oct 5, 2013.

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

    michaelkrauty

    Hello! I was wondering if there is a way to copy commented lines from the default config.yml to the generated config.yml? Currently, only uncommented lines are copied.

    Currently I'm using:
    getConfig().options().copyDefaults(true);

    Is there another way to do this that includes commented lines?

    Thanks
     
  2. Offline

    Goblom

    if the config.yml is location in the plugin jar you can do in onEnable()

    Code:java
    1. saveDefaultConfig();
     
    michaelkrauty likes this.
  3. Offline

    michaelkrauty

    Ah, there we go. Thanks.
     
Thread Status:
Not open for further replies.

Share This Page