I'm trying to set up a trap for my friend on my server, I want to use command blocks, not tripwire.
I know the
/testfor command, but it always says that it found me and doesn't give another output.
Arqade is a question and answer site for passionate videogamers on all platforms. It only takes a minute to sign up.Sign up to join this community
You can do this with the
Execute Notch ~ ~ ~ detect ~ ~-1 ~ grass 0 <command>
Replace notch with your friend's name, replace grass with the block name you want him to be standing on, and replace command with the command you want to do.
For get an output, you have to put a comparator in front of the command block. When it finds you, the comparator should emit a redstone pulse that will activate whatever you want.