Minecraft – How to testfor a named entity

minecraft-commandsminecraft-java-edition

I would like to testfor a Zombie called "Zombie Boss". I've tried this:

/testfor @e[Name=Zombie_Boss,r=10000] ~ ~ ~

But it doesn't work. Why?

Best Answer

The name argument shoudn't be capitalized, and also unless you are testing for the mob in a specific area, r argument isn't required, nor the ~s

Try this:

/testfor @e[name=Zombie_Boss]