Help getting items in config

Discussion in 'Spigot Plugin Development' started by Creepermanthe3rd, May 19, 2017.

  1. What would be the best way to get the items under voucher and put them in a list seperated by commas?
    Code (Text):

        type: DIAMOND
        name: "\xa7e\xa7lGKIT \xa7r\xa77[\xa76Grinder\xa77] (Right Click)"
        - "\xa77Right click this diamond to unlock the"
        - "\xa77[\xa76Grinder\xa77] \xa7eGkit \xa77(usable every 2 days)"
        commands: msg %player% this is a test
        type: STONE
        commands: msg %player% this is a test
  2. Use a enhanced for loop and irritate through each of the items and add them to an ArrayList?
  3. What do you mean by "separated by commas"?
  4. Lol, he wants to return like in the config the items, like 'cuc, cucc, cuccc" and so I told him to use an arraylist because it does it automatically for him.
  5. Lol, create an ArrayList<ItemStack>, for loop through the keys of "Vouchers", create an ItemStack for each key, add the type, name, and lore, then add it to the ArrayList<ItemStack>.