I'm making a Parkour Map and I need to know how to execute /execute @a ~ ~ ~ detect ~ ~-1 ~ minecraft:grass 0 /kill @p[c=1] in 1.13.
It doesn't work for me, because this code was used in version 1.9 or thereabouts. I'm playing on PC.

How do you do execute this command in 1.13?

execute as @a at @s if block ~ ~-1 ~ minecraft:grass run kill @s

This selects all players, individually checks each player to see if the block beneath them is grass, then kills off the player if it is.

A good place to look up what you can do with the execute command is on the Minecraft Wiki


how to kill someone when standing on a block in minecraft pc 1.13

execute as @a[distance=..1] run kill @s

use that command in pc it works in 1.13

  • 1
    Doesn’t this just find a player within a distance of 1 from the command block? – Penguin Nov 8 '20 at 6:29

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.