Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 0; i < this.plugin.online.size(); i++) {
- if (this.plugin.redTeam.size() > this.plugin.blueTeam.size()) {
- this.plugin.blueTeam.add(player);
- Bukkit.broadcastMessage(player.getName() + " joined the Blue Team");
- this.plugin.online.remove(player);
- } else if (this.plugin.blueTeam.size() > this.plugin.redTeam.size()) {
- this.plugin.redTeam.add(player);
- Bukkit.broadcastMessage(player.getName() + " joined the Red Team");
- this.plugin.online.remove(player);
- } else {
- Random random = new Random();
- if (random.nextBoolean()) {
- this.plugin.redTeam.add(player);
- Bukkit.broadcastMessage(player.getName() + " joined the Red Team");
- } else {
- this.plugin.blueTeam.add(player);
- Bukkit.broadcastMessage(player.getName() + " joined the Blue Team");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement