every tick:
	loop all players:
		set {_block} to block below loop-player
		{_block} is not air
		set metadata "lastLastStoodBlock" of loop-player to location above {_block}

on quit:
	clear metadata "lastLastStoodBlock" of player

on place:
	event is cancelled
	event-block is not block at metadata "lastLastStoodBlock" of player
	difference between y-coordinate of player and y-coordinate of event-location is less than 1
	set {_location} to location above metadata "lastLastStoodBlock" of player
	set x-coordinate of {_location} to x-coordinate of player
	set z-coordinate of {_location} to z-coordinate of player
	set pitch of {_location} to pitch of player
	set yaw of {_location} to yaw of player
	teleport player to {_location}