Using .yml files

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

Thread Status:
Not open for further replies.
  1. If I had a .yml file that looked like this:
        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.

    int num = getConfig().getInt("users.kabbage.num");
    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