If you used the Third Person Template’s character class then you must have an UCharacterMovementComponent component. This component has an accessor which returns if the player Is Flying (aka in Air)
IsFlying:
Or
IsMovingOnGround:
More Info About UCharacterMovementComponent:
I hope it helps!
Cheers,
Azarus