1

All you command block experts out there, please help.

MemeDawg1132 5/28/20 4:04 pm history
507
5/31/2020 8:20 am
I want to make a way to stop flying with an elytra midair by pressing crouch. I’m thinking maybe testing with a command block whether a player is flying with elytra, then if yes, test whether they are crouching or not. Then, if yes, somehow make them stop flying. Is there a way to do this? Please help. If you can, send a command that I can copy-paste into a command block, as I’m not very good at commands.
Posted by
MemeDawg1132
Level 1 : New Miner
0

  Have something to say?

JoinSign in

7

MemeDawg1132
05/31/2020 6:22 am
Level 1 : New Miner
Thanks
1
HoboMaggot
05/29/2020 4:00 am
Level 55 : Grandmaster Blob
You can use the FallFlying nbt and then detect if the player is crouching or not, using scoreboard commands.

However this is only detection of when you're flying and crouching, and as far as I know, there is no way to stop a player from flying their elytra
1
MemeDawg1132
05/29/2020 3:23 pm
Level 1 : New Miner
But other wise can you help me with the exact commands?
1
MemeDawg1132
05/29/2020 3:22 pm
Level 1 : New Miner
There is. I’ve made a way. I’ve used the /replaceitem and /clear commands to take the elytra out of the inventory and then replace it in 2 ticks.
1
HoboMaggot
05/30/2020 12:01 am
Level 55 : Grandmaster Blob
/scoreboard objectives add crouch_score minecraft:custom.sneak_time
Repeating CMD block:
execute as @a[scores={crouch_score=2..}] run scoreboard players reset @s crouch_score

Repeating CMD block/s
/execute as @a[nbt={FallFlying:1b},scores={crouch_score=1}] run <commands>
2
MemeDawg1132
05/31/2020 6:23 am
Level 1 : New Miner
It I need to run 2 different commands, and there is only space for one.
1
HoboMaggot
05/31/2020 8:20 am
Level 55 : Grandmaster Blob
history
yes you need 2 command blocks for this.
1

Welcome