Loading Strings from Config and adding to List<String>

Discussion in 'Plugin Development' started by CandyCranium, Jul 20, 2014.

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

    CandyCranium

    So I'm trying to loop through the ids from the ids.yml that I created, but it doesn't seem to loop through and add the String. Here's what the ids.yml looks like:
    Code:
    ID:
       - [idname]
       - [idname]
       - [idname]
    
    And this is the code I currently use that fails to add the Strings to the List:
    Code:java
    1.  
    2. public void setup() {
    3. for(String key : FFA.getInstance().getIDsConfig().getKeys(true)) {
    4. arenaList.add(key);
    5. }
    6. }
    7.  

    How would I do this correctly?
     
  2. Offline

    ImDeJay

    just get the config and set it to the list

    Code:java
    1. arenaList = FFA.getInstance().getIDsConfig().getStringList("ID");
     
    Dragonphase likes this.
Thread Status:
Not open for further replies.

Share This Page