private Location secureLocation(Location oldLocation, Player player) {

		World world = oldLocation.getWorld();
		int x = oldLocation.getBlockX(), y = oldLocation.getBlockY(), z = oldLocation
				.getBlockZ();

		// Block for feet
		Block blockOnY = world.getBlockAt(x, y, z);
		// Block for head
		Block blockOnY2 = world.getBlockAt(x, (y + 1), z);
		// Block below feet
		Block blockOnY3 = world.getBlockAt(x, (y - 1), z);

		Location safeLocation = null;

		// Load chunk before teleporting
		if (plugin.getMainConfig().doLoadChunk()) {
			if (!oldLocation.getChunk().isLoaded()) {
				// If chunk is not loaded -> load chunk

				oldLocation.getChunk().load();
			}
		}

		// Player would suffocate or fall down
		if (!blockOnY.getType().equals(Material.AIR)
				|| !blockOnY2.getType().equals(Material.AIR)
				|| blockOnY3.getType().equals(Material.AIR)) {
			int safeY = oldLocation.getWorld().getHighestBlockYAt(x, z);
			safeLocation = new Location(world, x, safeY, z);
		} else {
			safeLocation = oldLocation;
		}
		return safeLocation;
	}