Using .yml files

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

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

    kabbage

    If I had a .yml file that looked like this:
    Code:
    users:
      kabbage:
        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

    Tzeentchful

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

    Code:
    int num = getConfig().getInt("users.kabbage.num");
     
    getConfig().set("users.kabbage.num", 666);
     
  3. Offline

    kabbage

    I don't mean the config.yml file, I need to edit a different file that also has the extension of .yml.
     
  4. Offline

    Lolmewn

    YamlConfiguration config = YamlConfiguration.loadConfiguration(someFile);
     
Thread Status:
Not open for further replies.

Share This Page