I have the command:
execute @e[type=Villager] ~ ~ ~ effect @a[r=!4] 19 5 2
It should give poison to all players that are not in the radius of 4 blocks around my villager, but it does not work.
Is there an issue with
Arqade is a question and answer site for passionate videogamers on all platforms. It only takes a minute to sign up.Sign up to join this community
rm stands for minimum radius, so everyone with a minimum radius of 5 will be affected, but everyone with a radius that is less than 5 will not be affected. Your final command should then be:
execute @e[type=Villager] ~ ~ ~ effect @a[rm=5] 19 5 2
EDIT: I saw afterwards that @GiantTree also said this, sorry if it is seen as a copy, but I didn't see it there.