YML List Array

Discussion in 'Plugin Development' started by JjPwN1, May 4, 2015.

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

    JjPwN1

    Hey, I'm just wondering if it is possible with the Bukkit API to set up a list in a yml file like so:
    PHP:
    boosts:
      - 
    typeSpeed
        cooldown
    10
        timeout
    30
        respawn
    30
    Previously, I thought the only way to achieve this was by doing a key list, like below, but it has been brought to my attention that the above is valid yml.
    PHP:
    boosts:
      
    total1
      
    '1':
         
    typeSpeed
         cooldown
    10
         timeout
    30
         respawn
    30
     
  2. This is a StringList:
    Code:
    key:
    - text
    - text 1
    - text 2
    Code:
    key:
      value: example
      value2: another example.
    This is a ConfigurationSection
    To get all values under "key", loop through
    .getConfigurationSection("key").getKeys(false)
     
    Last edited: May 5, 2015
    mine-care likes this.
Thread Status:
Not open for further replies.

Share This Page