I want to test if any player is on a certain block. I want to kill them if they are standing on that certain block.
Minecraft – How to test what block is underneath you
minecraft-commandsminecraft-java-edition
Related Topic
- Minecraft Vanilla elevator
- Minecraft – Are you able to testfor people somewhere on a countdown
- Minecraft – How to test the command block contraptions for multiplayer compatibiltiy
- Minecraft – How to test for a player at a given x and z but at any height
- Minecraft – How to use ~ in /testfor command block
- Minecraft – How to test if a player has an air block underneath their feet? (1.14)
- Minecraft – How to transform the ID of a block at a certain position into an NBT string
Best Answer
execute
'sdetect
syntax is useful for this.In 1.11 and below:
In 1.12 and above:
This will kill anyone standing on sponge. The
*
is where you would put the block state, e.g forwool color=red
orstone variant=granite
.