[WiP]TeamAPI

Discussion in 'WIP and Development Status' started by Hobbit9797, Mar 11, 2013.

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

    Hobbit9797

    So
    I´m currently developing an API to make it easier for devs to include teams to their plugins.
    I just started so I don´t have that much now.
    I have:
    -set players team
    -get players team
    -check if player is in team
    -give player colored leather helmet
    -give player colored leather armor
    -give player colored wool block as head
    -give all players of a team an item

    Do you have ideas for methods I could add?
     
  2. Offline

    GodzOfMadness

    Hobbit9797
    1. Remove player from team
    2. Delete team
    3. Rename player team
    4. Return a arraylist of players in the team a player is in
     
  3. Offline

    Darq

    the things I marked as "no" are way too implementation specific. When you think of a team, you think of a group of people working together to achieve a common goal, not necessarily what colour shirt they're wearing, etc. Leave that kind of thing up to the developer using the API, your API will make it easy for them to manage the teams themselves, but what they do with those teams should be entirely up to them. You want the API to contain only the most useful functions, not have it bloated with stuff that people may never use.

    I marked the giving items feature as "maybe", because it probably would see a fair bit of usage, but then again not usages of a team is going to involve distributing items to the people in it, personally I'd leave it out and leave it up to the developer using the API.

    However, as GodzOfMadness said, returning some sort of collection that contains all the players in a team is essential, perhaps have a method that will return Player objects for those that are online, and another that will return a list of player names if teams support offline players. From a collection of the players, the developer using the API can do things like giving them items or setting their colour if he wants to. The other features Godz mentioned should probably be included as well.
     
  4. Offline

    Hobbit9797

    ArrayLists and removing guys from teams are in.
    Deleting a team is not possible, because I use HashMaps for teams.
     
  5. Offline

    LaxWasHere

  6. Offline

    Darq

    @Hobby9797 well. what about HashMap's remove(Object key) method? Being able to delete a team, I would say is a must.
     
  7. Offline

    Hobbit9797

    I was just convinced to create a class Team.class...
    So, I don´t use a HashMap anymore.

    btw: remove(object) just removes one element of the map.
     
Thread Status:
Not open for further replies.

Share This Page