Solved Config file format

Discussion in 'Plugin Development' started by inventorman101, Nov 28, 2013.

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

    inventorman101

    Hi, I have a stupid problem :p My config is saving all wrong. I am not sure what the problem is but it probably has to do with saving the config and copying the defaults. Thank you

    What it looks like:
    Code:
    #
    # Default Configuration settings
     
    foodRestore: 6
    itemName: Boiled Flesh
    
    What it should look like:
    Code:
    #BoiledFlesh Config File
     
    # Default Configuration settings
     
    #Remeber to double the amount of food you really want to restore ex. 3 food bars = 6
    foodRestore: 6
     
    #You can specify the name of the item here if you choose
    itemName: 'Boiled Flesh'
    
     
  2. Offline

    AoH_Ruthless

    inventorman101
    I think in your onEnable() you are calling the wrong config saver.
    Use this.saveDefaultConfig();
     
  3. Offline

    inventorman101

    AoH_Ruthless
    Thanks I will try that :)

    AoH_Ruthless
    Thanks that worked :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
  4. Offline

    AoH_Ruthless

Thread Status:
Not open for further replies.

Share This Page