this code is bad in many ways... to many codes written inside, old codes that can be done in one line and its heavy, since you designed it for acis you could at least follow the patterns they provide with the treads and the connections, I didnt see all the code but its if else if else if else if no switch case senarios and bad excersise to for->teams->get players-thread it could be done for players->getTeam-> actions 1 time on a thread if nessasary if you wanted it so much that way