please help me

Discussion in 'Plugin Development' started by kamakarzy, May 9, 2013.

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

    kamakarzy

    hi does anyone know a simple team plugin with a source code that i could look at as im struggling to create the team part of a team based game plugin with 2 teams.

    i learn by looking at code and cannot find a simple plugin so i can look at code and understand it
     
  2. Offline

    Nova20012

    If you post your code, the community can help you to fix your problem.
     
  3. Offline

    Ad237

    I am also trying to create the same thing but I have learned that asking people for code does not help you to learn. You will just copy and paste and will never learn. I recommend you do the same as what I have been doing for the past couple of days which is to watch tutorials on youtube on java and then you will have no trouble as I can tell you are not very experienced (Like myself) at coding.
     
  4. Offline

    kamakarzy

    thats the thing i really dont just copy and paste everything ive learned so far is by back tracking different plugins and understanding snipets i can not find any tutorials about team apart from scoreboards but i dont want a scoreboard just 2 teams. i will even make my code open source so everyone can see.
    i currently have no code just a to-do list as its all building on the main part what is the teams without that i can not do the rest .
     
  5. Offline

    zack6849

    ArrayList<String> TEAM_BLUE = new ArrayList<String>();
    ArrayList<String> TEAM_RED = new ArrayList<String>();
    etc, add players to teams like so

    TEAM_RED.add(event.getPlayer().getName());
     
  6. Offline

    kamakarzy

  7. Offline

    bennie3211

    this is not my thread, but I was wondering, is it possible to remove this arrayList when you wont need it anymore?
     
  8. Offline

    Nova20012

    bennie3211

    Remove the whole array list or just a player?

    If its just a player, then:
    Code:
    (ArrayListName).remove(event.getPlayer().getName());
    (I think)

    If you want to remove all the players, then:
    Code:
    (ArrayListName).removeAll(ArrayListName);
    So:
    [CODE:JAVA]TEAM_RED.removeAll(TEAM_RED);

    //or

    TEAM_RED.remove(event.getPlayer().getName()):[/CODE]

    That is what I think you would do, don't have a great experience with Array Lists so it could be wrong.
     
Thread Status:
Not open for further replies.

Share This Page