-2

I am currently making a trolly Minecraft parkour map. I have two blocks, one on each side, so the players can jump to either side. I want to make it so when they jump on either of these blocks, the block is filled with air and they fall to their death. :) However, I cant figure out how to use the /detect command. Please help me. Thanks.

1

/detect is not a command on it's own. it's a subcommand of execute.

I think what you want is as simple as

/execute @a[..] ~ ~ ~ detect ~ ~-1 ~ <block> <blockstate> /setblock ~ ~-1 ~ air

replace the <block> with the block you're trying to detect and the <blockstate> with the respective blockstate (or a * for "doesn't matter which blockstate").

e.g.:

/execute @a ~ ~ ~ detect ~ ~-1 ~ stone * /setblock ~ ~-1 ~ air

this command will replace any stone block any player is trying to stand on with air.

  • Thanks! Appreciate the help. I did not know that it had to be used with /execute. Thanks! – A Cardboard Box Jan 1 '18 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.