Getting teams from config?

Discussion in 'Plugin Development' started by LilProgrammer, Aug 19, 2014.

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

    LilProgrammer

    I want to be able to add teams into a config file and have the plugin loop and register each team and add all the players in a list below the teamname. For example (if this makes sense):
    Each config entry into the config should look like this:
    TeamName:
    Players:
    - player1
    -player2
    Color: GREEN

    I just don't know where to start and how I should achieve this.
     
  2. Offline

    Gerov

    Well, first you'd get the list from TeamName.Players, and then you'd loop through the list adding the players to a hashmap appropriately.
     
  3. Offline

    LilProgrammer

    Gerov The problem is that TeamName won't always be "TeamName". It's will be a random string, created by the user in the config file. From there I don't know how to access the 'unkown' key.
     
Thread Status:
Not open for further replies.

Share This Page