src/main/java/me/ohowe/minigame/utils/Team.java
/**
     * @param players The list of players to be split into the teams.
     * @param team1   The first team
     * @param team2   The second team
     */
@param players The list of players to be split into the teams.
@param team1   The first team
@param team2   The second team
@param players The list of players to be split into the teams . @param team1 The first team @param team2 The second team
public static void splitPlayers(ArrayList<Player> players, Team team1, Team team2) {
        ArrayList<Player> copy = (ArrayList<Player>) players.clone();
        Collections.shuffle(copy);
        team1.addAll(copy.subList(0, copy.size() / 2));
        team2.addAll(copy.subList(copy.size() / 2 + 1, copy.size()));
    }
public static void splitPlayers ( ArrayList < Player > players , Team team1 , Team team2 ) { ArrayList < Player > copy = ( ArrayList < Player > ) players . clone ( ) ; Collections . shuffle ( copy ) ; team1 . addAll ( copy . subList ( 0 , copy . size ( ) / 2 ) ) ; team2 . addAll ( copy . subList ( copy . size ( ) / 2 + 1 , copy . size ( ) ) ) ; }
@param players The list of players to be split into the teams.
@param players The list of players to be split into the teams .