Solved How would I get the size of teams?

Discussion in 'Plugin Development' started by MGlolenstine, May 28, 2017.

Thread Status:
Not open for further replies.
  1. Ok so I have my config set like this [​IMG] , now I just don't have any idea, how I would get the highest number meaning the "name" of a team in this example?

    Can I load it into an Array, Class? Anything?
     
  2. Offline

    Omer H.

    config.getKeys(false);
    maybe...?
     
  3. What would I get as the response?
     
  4. Offline

    Zombie_Striker

    @MGlolenstine
    getKeys returns a Set of Strings, where the strings are the keys. Though, @Omer H. should have included the getConfiguration section, as you do not just want to get the keys at the top level. For that, use
    Code:
    config.getConfigurationSection("ew2.players").getKeys(false);
    //This will return "players_online," "Number_of_players",0,1,2,3,...
     
  5. config would be getConfig() right?
     
  6. Offline

    Zombie_Striker

Thread Status:
Not open for further replies.

Share This Page