@Override
public void newConnectionEvent(NEConnection c) {
synchronized(clientsConnected){
if(clientsConnected < player.length-1){
player[clientsConnected] = new NEplayer(c.getContactName(),c);
clientsConnected += 1;
player[clientsConnected].send(new NEPlayerIDMessage(player[clientsConnected].getPlayerId()));
log("new player registerd: name " + c.getContactName() + ", ID " + player[clientsConnected].getPlayerId());
} else {
player[clientsConnected] = new NEplayer(c.getContactName(),c);
player[clientsConnected].send(new NEPlayerIDMessage(player[clientsConnected].getPlayerId()));
log("new player registerd: name " + c.getContactName() + ", ID " + player[clientsConnected].getPlayerId());
clientsConnected += 1;
lan.stopListening();
}