How to make a command edit config

Discussion in 'Plugin Development' started by MeZTech, Oct 30, 2012.

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

    MeZTech

    I would really like to know how to make a command edit a part of this config file. I have another command working that lists the text in that config file, but I need another command that can edit it. What would be the code for this.
     
  2. Offline

    Sagacious_Zed Bukkit Docs

  3. Offline

    MeZTech

  4. Offline

    AJAW

    You can use in your onCommand method:
    getConfig().set("testpath", args[0]);
    This would look like this
    /<command> Test , it would set string "Test" to testpath inside your config.
     
  5. Offline

    MeZTech

  6. Offline

    Sagacious_Zed Bukkit Docs

  7. Offline

    MeZTech

    Yes, I did. Its at the beginning of where I start my commands.
     
Thread Status:
Not open for further replies.

Share This Page