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
	distance between player and event-location is less than or equal to 1.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}