-1

I'm making a spellbook in Minecraft, and I want to make a spell that affects everyone in a certain radius except me, so I just made this:

/effect @a[r=10,type=!@p] 15 60

It doesn't seem to work. What is wrong with it?

2
  • We don't know, what doesn't it do that you want it to do? Is it affecting you when you don't want it to? Is not affecting anyone? Commented Apr 26, 2015 at 4:47
  • For starters it should be @a not @A Commented Apr 26, 2015 at 5:00

2 Answers 2

2

Try rm, e.g. /effect @a[r=10,rm=1] 15 60. Then it will only work on players at least one block away from you, so not you.

3

You can use /effect @a[r=10,name=!YourPlayerName] 15 60

If you want to use it with different playernames, you can do this:

  • First make a new scoreboard objective (/scoreboard objectives add someName dummy)
  • Then set the score for all players to 1 (/scoreboard players set @a someName 1)
  • Then set the score for you to 0 (/scoreboard players set @p someName 0)
  • Then use this command to give the effect: /effect @a[r=10,score_someName_min=1] 15 60
1
  • I think this is the better answer, as it works for command blocks as well, and allows further options.
    – Dova
    Commented Feb 21, 2017 at 20:06

You must log in to answer this question.

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