Updated:
The simplest way: change game mode
/gamemode creative
/gamemode spectator
In Creative, double-tap jump to fly. Spectator mode is always flying and can pass through walls, which is handy for scouting. Return with /gamemode survival.
Java: alternatives that keep Survival
| Method | Command | What it does |
|---|---|---|
| Levitation | /effect give @s minecraft:levitation 5 1 true | Floats upward for 5 seconds; you cannot descend on your own |
| Slow falling | /effect give @s minecraft:slow_falling 60 0 true | Fall slowly and land safely |
| Elytra | /give @s minecraft:elytra | Glide from high places |
| Rockets | /give @s minecraft:firework_rocket 64 | Boost while gliding with an elytra |
Wear the elytra in the chest slot and press jump while falling to open it. Use a rocket while gliding to speed up.
Java: launch with a trident or wind charges
These are not flight, but they get you high into the air while staying in Survival.
# Riptide III trident (works in water or rain)
/give @s minecraft:trident[enchantments={riptide:3}] 1
/weather rain
# Wind charges (Java 1.21+)
/give @s minecraft:wind_charge 64
- Riptide: in rain, hold and release the trident to launch in the direction you face. With an elytra you can keep flying without rockets.
- Wind charge: throw it at your feet to bounce high. Throw another before you land to go higher.
Both can still cause fall damage on landing, so add Slow Falling while you practice.
Bedrock: /ability mayfly
/ability @s mayfly true
Bedrock has /ability when the world setting "Education Edition" is turned on. With mayfly true, players can double-tap jump to fly while staying in Survival. Set it to false to undo. Change the setting on a copy of your world first; Realms and external servers may not allow it.
Servers
Java servers running Paper or Spigot often use plugins such as EssentialsX, which add a /fly command for players with permission. On vanilla servers, switching game mode is the only command-based option.
Common problems
- Levitation will not stop: remove it with
/effect clear @s minecraft:levitation(Bedrock:/effect @s clear), and add slow falling first so you land safely. - /ability is unknown: it only exists on Bedrock with Education features on.
- Spectator flight speed: on Java, scroll the mouse wheel to change it.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.