Solved Config path Help!

Discussion in 'Plugin Development' started by rawiuwt, Jul 27, 2013.

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

    rawiuwt

    in my config.yml is
    key:
    - blockID: 16
    dropID: 263
    count: 1
    - blockID: 21
    dropID: 351
    damage: 4
    count: 1
    - blockID: 56
    dropID: 264
    count: 1
    How I get List<Integer> of blockID?
     
  2. Offline

    AmShaegar

    Indentation is incredibly important for YAML. If you want a proper answer we would need to see indentation.
     
  3. Offline

    rawiuwt

    AmShaegar
    Code:
    key:
      - blockID: 16
        dropID: 263
        count: 1
      - blockID: 21
        dropID: 351
        damage: 4
        count: 1
      - blockID: 56
        dropID: 264
        count: 1
    
     
  4. Offline

    AmShaegar

    Code:java
    1. int blockID = (Integer) getConfig().getMapList("key").get(0).get("blockID");
    2. int dropID = (Integer) getConfig().getMapList("key").get(0).get("dropID");
    3. int count = (Integer) getConfig().getMapList("key").get(0).get("count");
     
Thread Status:
Not open for further replies.

Share This Page