Using .yml files

Discussion in 'Plugin Development' started by kabbage, Mar 27, 2012.

Thread Status:
Not open for further replies.
  1. If I had a .yml file that looked like this:
    Code (Text):
    1. users:
    2.   kabbage:
    3.     num: 17
    How would I load the file and get the number 17, and then how would I change that number to something else? (like 18)
  2. Offline


    if you have any more questions to do with configs go to the wiki.

    Code (Text):
    1. int num = getConfig().getInt("users.kabbage.num");
    3. getConfig().set("users.kabbage.num", 666);
  3. I don't mean the config.yml file, I need to edit a different file that also has the extension of .yml.
  4. YamlConfiguration config = YamlConfiguration.loadConfiguration(someFile);
Thread Status:
Not open for further replies.

Share This Page