@Override
    public void connectionAdded(Server server, HostedConnection conn) {
        lock.lock();
        try {
            if(connectedPlayers >= neededPlayers) {
                System.out.println("Sorry, server full! ->Rejecting player " + conn.getAddress() + "with Id "
                        + conn.getId());
                conn.close("Sorry, server full! Maybe next round!");
                return;
            }
            connectedPlayers++;
            System.out.println(connectedPlayers + " players connected. " + (neededPlayers - connectedPlayers)
                    + " more to go.");
        } finally {
            lock.unlock();
        }
    }