Solved How to run enhanced for loop for FileConfiguration's object ?

Discussion in 'Plugin Development' started by Ibas, Aug 29, 2013.

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

    Ibas

    Hey, so how may I run for loop for darbai:

    static File darbaiFile = new File("plugins/Funkcijos", "darbai.yml");
    static FileConfiguration darbai = YamlConfiguration
    .loadConfiguration(darbaiFile);

    My config looks something like this:

    Mister: 0
    Shoy: 0
    Eta: 0
    mor2: 0

    And I only need to run first value I mean convert to maybe even a list? Because I only need these player names in String:

    Mister
    Shoy
    Eta
    mor2

    But how to convert?
     
  2. Offline

    xTrollxDudex

    Ibas
    You loop through the String keys found in the FileConfiguration's ConfigurationSection I believe
     
  3. Offline

    Ibas


    Um, how? Could you give me piece of code ;D?
     
  4. Offline

    xTrollxDudex

    Ibas
    I'm not familiar with this topic since I never need it :p maybe someone else can help
     
Thread Status:
Not open for further replies.

Share This Page