Getting list config nodes(?)

Discussion in 'Plugin Development' started by brord, Dec 10, 2012.

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

    brord

    Hey guys, I am stuck once again...
    I have this config named maps
    It looks like this:
    Code:
    map1:
      x1: 26
      y1: 84
      z1: 752
      x2: 134
      y2: 13
      z2: 61
      beginA: 17,1788,21
      beginB: 314,711,81
      spawnpoint1: 16,17,18
      spawnpoint2: 16,17,82
      spawnpoint3: 724,721,171
    map2:
      x1: 73215
      y1: 71
      z1: 71
     
      x2: 17
      y2: 71
      z2: 71
     
      beginA: 823,823,84
      beginB: 82,675,26
      spawnpoint1: 75,85,16
      spawnpoint2: 25,165,26
      spawnpoint3: 1825,64,5
    
    How can Turn this config into an array of names like
    String[] names = config.getAll();
    system.out.print(names[]);

    Which would output map1, map2.

    Is this even possible?

    Thanks!
     
  2. Offline

    fireblast709

    getConfig().getKeys(false) would give you a Set with {"map1", "map2"}
     
  3. Offline

    brord

    Oh, i was allready wondering what it did :)
    I will totaly put you in the dev list from my plugin, you have helped me out A LOT

    Thanks!
     
  4. Offline

    fireblast709

    brord I will be watching Bukkit Dev :p
     
  5. Offline

    gomeow

    If you want a certain section:
    Code:
    getConfig().getConfigurationSection("map1").getKeys(false);
     
    sgavster likes this.
Thread Status:
Not open for further replies.

Share This Page