Updated:
1. Create the score
/scoreboard objectives add sneak minecraft.custom:minecraft.sneak_time
It goes up by one every tick while the player sneaks. Run it once.
2. Sneak to super jump
# Repeat, Always Active
execute as @a[scores={sneak=1..}] run effect give @s minecraft:jump_boost 1 4 true
# Chain, Always Active
scoreboard players reset @a[scores={sneak=1..}] sneak
Jump right after crouching to leap high. The reset makes the effect fade a second after you stop.
3. Item plus sneak
execute as @a[scores={sneak=1..}] if items entity @s weapon.mainhand minecraft:feather at @s run particle minecraft:cloud ~ ~ ~ 0.3 0.1 0.3 0 3
Only fires while holding a feather (1.20.5+). See held item effects.
4. Hold to teleport
execute as @a[scores={sneak=60..}] run tp @s 0 100 0
scoreboard players reset @a[scores={sneak=60..}] sneak
Teleports players once their total sneak time reaches 3 seconds. The score never goes down, so short crouches add up. Add a check for the block underfoot and you get an elevator that goes down when you sneak.
Troubleshooting
- Nothing happens: create the objective and match its name.
- Fires before sneaking: clear old scores with
/scoreboard players reset @a sneak. - Bedrock: has no sneak statistic, so this is Java only.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.