I'm making a map for Minecraft and I want the player to teleport when standing on orange wool. I used this:

/execute @a ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 1 0 tp @p[c=1] 0 0 0

But I constantly get an error

[16:40:51] Failed to execute 'detect' as F1NN3RT

(F1NN3RT is my in-game name)

What am I doing wrong?

1 Answer 1


The syntax of execute detect is:

/execute <entity> <x> <y> <z> detect <x> <y> <z> <block> <dataValue> <command>

You have got an extra 0 after the dataValue, which Minecraft thinks is meant to be the command. Try:

/execute @a ~ ~ ~ detect ~ ~-1 ~ minecraft:wool 1 tp @a[c=1] 0 0 0

I've also switched the @p for an @a[c=1]. This is because @a will select dead/alive players, but @p will not. If a player were to die on orange wool with the original command, they would keep teleporting the nearest alive player to those coordinates.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .