Solved Config.yml

Discussion in 'Spigot Plugin Development' started by ParaStyle, Oct 4, 2015.

  1. I made a config file like this:
    Code (Text):
    # Plugin made by ParaStyle
    # Version 1.0

    # Change the message when you win
    Win message: "Congrats! You won!"

    # Change the message when you lose
    Lose message: "Oh no! You lost!"

    # Change the currency symbol
    Currency symbol: "$"
    But when I look at the generated config, this is what I get, all the comments are removed except for the first ones.
    Code (Text):
    # Plugin made by ParaStyle
    # Version 1.0
    #
    # Change the message when you win
    Win message: Congrats! You won!
    Lose message: Oh no! You lost!
    Currency symbol: $
     
  2. saveDefaultConfig();
    NOT saveConfig(); <-- will override comments excluding header
     
    • Like Like x 1
  3. That worked!
    Thank you!