Get YAML Configuration

Discussion in 'Plugin Development' started by Megolas, Aug 6, 2014.

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

    Megolas

    Hello,
    Is there a way to fetch each of the items in the following example as YamlConfiguration objects with bukkit's YAML API?
    Code:
    items:
        - part_no:  A4786
          descrip:  Water Bucket (Filled)
          price:    1.47
          quantity:  4
     
        - part_no:  E1628
          descrip:  High Heeled "Ruby" Slippers
          size:      8
          price:    100.27
          quantity:  1
    I'm not looking to give them names and use getKeys.
     
  2. Offline

    1Rogue

    Right now "items" would just return a List<MemorySection>, and then you'd need to get each part anyhow. Look into using ConfigurationSerializable
     
  3. Offline

    xXMaTTHDXx

    Megolas as 1Rogue had said, look into Confiugrations a bit more, I would first save the items it like so: 22,4 Meaning item 22 and 4 of them, then when you want to get the itemstack just for loop through the list and parse at ','.
     
Thread Status:
Not open for further replies.

Share This Page