public void addConnections(PlayerMP player, Packet00Login packet) {
	boolean alreadyExist = false;
	for (PlayerMP p : connectedPlayers) {
	    if (player.getUsername().equalsIgnoreCase(p.getUsername())) {
		
		if (p.getIp() == null) {
		    p.setIp(player.getIp());
		}
		
		if (p.getPort() == -1) {
		    p.setPort(player.getPort());
		}
		
		alreadyExist = true;
	    } else {
		sendData(packet.getData(), p.getIp(), p.getPort());
		
		packet = new Packet00Login(p.getUsername(), p.getX(), p.getY(), p.getHP(), p.getUniqueID());
		sendData(packet.getData(), player.getIp(), player.getPort());
	    }
	}
	
	if (!alreadyExist) {
	    connectedPlayers.add(player);
	    if (player.getIp() != null) {
		Packet04Tiles packetTiles = new Packet04Tiles(game.getLevel().getTiles());
		sendData(packetTiles.getData(), player.getIp(), player.getPort());
		
		Packet05AddNPC packetNPC = null;
		for (Mob m : game.getLevel().getMobs()) {
		    if (!(m instanceof Player)) {
			packetNPC = new Packet05AddNPC((int) m.getX(), (int) m.getY(), m.getHP(), m.getUniqueID(), m.NPCType );
			sendData(packetNPC.getData(), player.getIp(), player.getPort());
		    }
		}
		
	    }
	}
    }