Minecraft – How to testfor if a player is gliding with an elytra

minecraft-commandsminecraft-java-edition

I'm working on a map that requires a command to run if a player is using an gliding with an elytra. Are there any NBT tags or other commands that can be used to testfor gliding?

Best Answer

The FallFlying tag will be 1 if the player (or any other mob) is flying with elytra. You can apply a label to the player based on that value for multiplayer-friendly detection:

/scoreboard players tag @a[tag=flying] remove flying
/scoreboard players tag @a add flying {FallFlying:1b}

/say Players that are flying: @a[tag=flying]
Related Topic