Getting config path names

Discussion in 'Plugin Development' started by unrealdesign, May 22, 2013.

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

    unrealdesign

    So I'm getting very confused on how to do something and I'm looking for some help. Lets say I have a config, with a path of:

    Code:
    arenas:
      Arena1:
        spawn:
          loc: x, y ,z
      Arena2:
        spawn:
          loc: x, y ,z
      Arena54:
        spawn:
          loc: x, y ,z
    

    How would I get all of the path names under arenas to get it to print on "Arena1, Arena2, Arean54".

    The reason I need this is so I can get the names of arenas I have for each game, and this is the only way I can think of for getting each arena name. If you have another ideas, please suggest or explain :)

    Thanks in advance!
     
  2. Offline

    JWhy

    That's not valid YAML : P
    [ CODE ] tag or pastebin.com for YAML markup, please
     
  3. Offline

    unrealdesign

    The point is the paths, not the values of loc. Everything I've coded works except for this part right now.

    Here is a randomly generated code then:
    Code:
    arenas:
      Test1:
        lobby:
          x: -63.62061662923177
          y: 75.0
          z: 181.81896639019618
          pitch: 57.000023
          yaw: 323.0499
          world: world
      Test2:
        lobby:
          x: -61.05885839971529
          y: 75.0
          z: 182.8267856343718
          pitch: 57.000023
          yaw: 323.0499
          world: world

    I want it to return: "Test1" and "Test2"
     
  4. Offline

    gomeow

    getConfig().getConfigurationSection("arenas").getKeys(false);
     
  5. Offline

    unrealdesign

Thread Status:
Not open for further replies.

Share This Page