Solved How to add comments in the config.yml (#blablabla)

Discussion in 'Plugin Development' started by Jumb_1907, May 2, 2017.

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

    Jumb_1907

    Hey,

    I've added comments in my config.yml but when I export the plugins it's still empty
     
  2. Offline

    yPedx

    @Jumb_1907
    Use saveDefaultConfig(); in onEnable.
     
  3. Offline

    MrGeneralQ

    Okay this is a common misstake that people don't understand. First of all use saveDefaultConfig() that 1 thing you have to make sure.

    the 2nd and most important thing: A config file should be read only! As soon as you change something in the config the comments will dissapear. So only use a config to read stuff , not save stuff. Use another file to store data.
     
  4. Offline

    Jumb_1907

    Thank you for helping guys!
     
  5. Offline

    MrGeneralQ

    No problem :) Mark your thread as solved if your problem is fixed
     
Thread Status:
Not open for further replies.

Share This Page