execute as @a[tag=!questE.flying,nbt={FallFlying:true}] run tag @s add questE.flying

execute as @a[tag=questE.flying] at @s if block ~ ~-1 ~ mud_bricks run function lbdm:queste/end

execute as @a[tag=questE.flying,nbt={FallFlying:false}] run function lbdm:queste/teleport_self
execute as @a[tag=questE.flying,nbt={FallFlying:false}] run tag @s remove questE.flying
execute as @a at @s if block ~ ~-0.05 ~ #lbdm:queste_ground run function lbdm:queste/teleport_self