1

There are ways to detect if a player is far from a command block or villager but how do you give an effect to a player who leaves a certain radius from another player?

  • 2
    Have you tried anything yourself? – rivermont - Will B. Nov 9 '16 at 19:26
  • Ive tried using testfor and using @e with players and a few other methods but they havent been giving any good signs – Brandomized Nov 9 '16 at 20:04
1

You're gonna need execute for this one. Execute a command on the first player that selects the nearest player outside your radius and gives them the effect.

execute player_who_gives_others_the_effect ~0 ~0 ~0 effect @p[rm=5,c=1] minecraft:nausea

rm = minimum radius

c= count

This command gives the player outside the radius nausea. Find the other effects here: http://minecraft.gamepedia.com/Data_values#Status_effects

|improve this answer|||||
  • Ive tried changing it around a bit but it fails at the effect, I cant seem to change anything to fix it but thank you for the most part, it may just be that Im using 1.8 though – Brandomized Nov 10 '16 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.