Get all sub paths from YML

Discussion in 'Plugin Development' started by Spikes, Jun 30, 2012.

  1. Offline

    Spikes

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hello,

    i want to know how i get all substrings from an YML.
    Code:
    teleports:
      default:
        X: -139.17698014348449
        Y: 63.0
        Z: 66.87322750216393
      spawn:
        X: -137.51583243225713
        Y: 44.0
        Z: 66.41659359946972
    Like all sub paths from teleport as a list. E.G. default, spawn
  2. Offline

    ferrybig

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    ConfigurationSection.getKeys(true) gives ALL the subnodes, and nodes from that
  3. Offline

    Spikes

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thanks.
    I used now .getConfigurationSection("teleports").getKeys(false)
  4. Offline

    Thumbz

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    why does it return a set? What a pain in the ass.
  5. Offline

    Sagacious_Zed Bukkit Docs

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    How so? It is a data collection with certain properties, one which you can still iterate through.

Share This Page