Setting kit contents in a config

Discussion in 'Plugin Development' started by diamondcodes, Oct 21, 2014.

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

    diamondcodes

    Hello,

    I am about to make a kit pvp plugin, And I would like to know how I would set the contents of the kits in a config, For Example the config would look like
    Code:
    Kits:
      Test:
        - DiamondHelmet
        - DiamondChestplate
        - DiamondLeggings
        - DiamondBoots
    
    Thanks
     
  2. Offline

    teej107

  3. Offline

    TheCwispyOne

    Code:java
    1. List<String> contents = getConfig().getStringList("Kits.Test");
    2. contents.add("DiamondHelmet");
    3. contents.add("DiamondChestplate");
    4. contents.add("DiamondLeggings");
    5. contents.add("DiamondBoots");
    6. getConfig().set("Kits.Test", contents);
    7. saveConfig();
     
Thread Status:
Not open for further replies.

Share This Page