Usually you would have a small system that clears people who just died on a combat game. But for some reason, using the execute command on a dead person doesn't work while setting scoreboards, tp'ing and clearing do work.
What I expected to happen:
/execute on dead people would work normally like it does for /clear and /tp
What actually happened:
/execute'ing on a dead person results in the following error:
"The entity UUID provided is in an invalid format"
How to reproduce:
/scoreboard objectives add hasDied deathCount
create a redstone clock which powers commandblocks with the following commands.
/clear @a[score_hasDied_min=1]
/execute @a[score_hasDied_min=1] ~ ~ ~ say I died
/scoreboard players set @a[score_hasDied_min=1] hasDied 0
That is to be expected since
execute
works on behalf of the player ("As if the player is executing this command").The executed command is also using the coordinates of the player (e.g.
execute @a ~ ~ ~ setblock ~ ~-1 ~ minecraft:stone
places a stone block below each player. Since the player is dead, there are no longer coordinates.