private void update() {
	
	
	if (server != null) {
	    if (timeToAddMob <= 0) {
		addMob();
		timeToAddMob = 60 * 10;
	    }
	    timeToAddMob--;
	}
	
	key.update();
	if (!key.pause && !key.menu) {
	    level.update();
	}

	if (player.isRemoved()) {
	    respawn_in--;

	    if (respawn_in <= 0) {
		player.setHP(100);
		player.revive();
		level.addEntity(player);
		Point p = getRandomSpawnPoint();
		Packet07Respawn packet = new Packet07Respawn(player.getUsername(), (int) p.getX(), (int) p.getY(), player.getHP(), player.getUniqueID());
		packet.writeData(client);
		respawn_in = 60 * 5;
	    }
	}
    }