Algorithm for Player Block/Entity colision?

My player is a rectangle so is the block and i cant get it to collide properly i get my player thrown of the game camera and I don’t know what am i doing, my code:
in Block :


	public void tick() {
		if (solid) {
			if (this.intersects(getPlayer())) {
				intersecting();
			}else{
				getPlayer().down = true;
				getPlayer().up = true;
				getPlayer().left = true;
				getPlayer().right = true;
			}
		}
	}

	public void intersecting() {
		if (getPlayer().x > x) {
			getPlayer().left = false;
		}if (getPlayer().x < x) {
			getPlayer().right = false;
		}
		if (getPlayer().y > y) {
			getPlayer().up = false;
		}if (getPlayer().y < y) {
			getPlayer().down = false;
		}
		getPlayer().intersecting(this.intersection(getPlayer()));
	}

in Player:


	public void intersecting(Rectangle r) {

		boolean leftorright = false;
		boolean upordown = false;

		if (r.width < r.height) {
			leftorright = true;
		} else {
			upordown = true;
		}

		if (leftorright) {
			if (x < r.x) {
				x -= r.width / 2;
				getCamera().xOff += r.width / 2;
			} else {
				x += r.width / 2;
				getCamera().xOff -= r.width / 2;
			}
		}
		if (upordown) {
			if (y < r.y) {
				y -= r.height;
				getCamera().yOff += r.height;
			} else {
				y += r.height;
				getCamera().yOff -= r.height;
			}
		}

	}

This code is just working when colliding with just 1 block when 2 blocks come in contact BOOOOOM player is no more in the center of the screen :\ help?!

Is it really necessary for the solid, non-moving blocks to check for collisions with the player?

Well no. But that is what i did and it is not working so i need help just making them collide properly or can you give me some rect collision tutorial?

It was a hint on what may be the cause of your issues. Think what if two blocks simultaneously do a collision event on the player - what would happen?

Well one block would put me inside the other block and the other block would shoot me out the other side and camera would not move so my player would bug out of the screen :\