This question already has an answer here:
I have been trying to make a safezone for a map. I want to make it kill any mobs that come into the safezone except for villagers (for trading) and players within a certain radius.
I have looked at quite a few of the questions on here and haven't found the answer I'm looking for. Some people suggested using scoreboards and I find them extremely complicated. I don't know if they have a range function. I have seen some people say to make multiple kill commands and string them up, but I can't do that because I have the Mo' Creatures mod installed.
I am running Minecraft 1.10.2.
If anyone needs extra info on something comment and ask about it as I don't know what else to say in the question. Please don't be harsh like some people have been to me in the past.