getConfigSection mergers Objects

Discussion in 'Plugin Development' started by UniqueNameDen, Apr 21, 2015.

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

    UniqueNameDen

    So I have this config:
    Code:yaml
    1.  
    2. loot:
    3. loot1:
    4. items:
    5. GOLD_ORE: 20
    6. IRON_ORE: 10
    7. GOLD_ORE: 30
    8. chance: 30
    9. rows: 1
    10.  

    But, GOLD_ORE gets merged and it only returns:
    Code:java
    1. [IRON_ORE, GOLD_INGOT]

    How would I fix this?
     
  2. Offline

    lecraeman

    What is the config for, and also I would assume it's combining the TWO "gold_ore" parts since they're almost exactly the same except for the end number.
     
  3. Offline

    UniqueNameDen

    @lecraeman I need a way to get around the "I would assume it's combining the TWO "gold_ore" parts" part...
     
  4. Offline

    UniqueNameDen

  5. Offline

    mine-care

  6. Offline

    1Rogue

    Because that's not how YAML works, yaml mappings have a single key to a single value.
     
  7. Offline

    UniqueNameDen

    I just endedup using
    Code:
    items:
      0:
        GOLD_ORE: 20
      1:
       IRON_ORE: 10
      2:
       GOLD_ORE: 30
    
     
Thread Status:
Not open for further replies.

Share This Page