How to get a config section like this

Discussion in 'Plugin Development' started by ron975, Nov 2, 2012.

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


    2. foobar:
    3. - foo:
    4. bar: true
    5. rab: 'foobar'
    6. - mine:
    7. craft: 1
    8. tfarc: false

    How could I get and set the values of key?
  2. I would see this as
    foobar is a list of configuration section
    try doing some more discovering if you know this, as I dont know al the things from my head
  3. Offline


    Why not just do the config like this:
    1. foobar:
    2. foo:
    3. bar: true
    4. rab: 'foobar'
    5. mine:
    6. craft: 1
    7. tfarc: false

    Then you could just get the keys with getKeys(false), in this case it would return a Set with foo and bar, and use this to get bar, rab, craft and tfarc
  4. Offline


    I guess this works for me, thanks
Thread Status:
Not open for further replies.

Share This Page