I want to have a command block that has /execute if entity that will only execute on entities with a custom name, but I can’t figure out how to do it.

1 Answer 1



/execute if entity @e[name=“insert name”] (rest of command)

If it’s going to be one mob with this name as well as going to be released publicly, I recommend doing this:

/execute if entity @e[name=“insert name”,type=“insert mob”] (rest of command)

You must log in to answer this question.

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