using item id's

Discussion in 'Plugin Development' started by kamakarzy, May 10, 2013.

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

    kamakarzy

    how do you use item id in a config file
     
  2. like any other integer
     
  3. Offline

    kamakarzy

    sorry think you missunderstood i mean multiples eg.
    Code:
    items: 1,2,3,4
    ??
     
  4. Offline

    desht

    You can specify a list of integers in a YAML file like this:
    Code:
    items: [ 1, 2, 3, 4 ]
    
    or like this:
    Code:
    items:
      - 1
      - 2
      - 3
      - 4
    
    And use config.getIntegerList("items") to retrieve the list.

    (And I don't think ferrybig "misunderstood" you - your original question said nothing at all about multiples or lists).
     
  5. Offline

    kamakarzy

    desht sorry i thought i did explain.
    i need how to know how to correctly do this
    Code:
    event.getPlayer().getInventory().addItem(plugin.getConfig().getIntegerList("Day7"));
     
Thread Status:
Not open for further replies.

Share This Page