0

I am trying to check a PVP bot's health, except every time I try to. it says it can't. Here is my current command:

/execute if entity @e[name=Skeleton] [nbt={Health:10.0f}] run setblock 49 157 81 redstone_block 

Here is the error message:

Incorrect argument or command ...Skeleton] (red text starts here) [nbt={Health:10.0f}] run setblock 49 157 81 redstone_block*<--[HERE]* .

I've tried playing around with the command, asking friends, and now I'm here, so please help.
Version: 1.19.2.

1 Answer 1

3

Try this:

/execute if entity @e[name=Skeleton,nbt={Health:10.0f}] run setblock 49 157 81 redstone_block

It worked in my test world. Your problem was that you needed a comma between [name=Skeleton and nbt={Health:10.0f}] instead of a space and brackets

0

You must log in to answer this question.

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