Players join random teams with scoreboard?

Discussion in 'Plugin Development' started by ItsLeoFTW, Jan 26, 2014.

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

    ItsLeoFTW

    Hey,
    It's me again. I was wondering if it was possible to have players randomly join teams. For example:
    [My Game] 8 players join.
    [My Game] 3 players are automatically put onto BLUE team.
    [My Game] And 5 players are automatically put onto RED team.

    Is this possible? I'm guessing it is, since Hypixel did it.
     
  2. Offline

    felixfritz

    I guess you could create the teams, loop through the player's and randomly put them into team blue or red. If you want to equally distribute them, you could eg. say that the first half is going to blue and the second half to red (maybe also shuffle the array, just to be sure it's really random (use Collections.shuffle(list) if you're using a collection))
     
  3. Offline

    ItsLeoFTW

    Could you tell me how to do this? I'm not that familiar with that kind of stuff.
     
  4. Offline

    L33m4n123

  5. Offline

    felixfritz

    ItsLeoFTW
    What are you not familiar with? Teams, algorithms, arrays?
     
Thread Status:
Not open for further replies.

Share This Page