Command to affect every player except myself

//ads -- adsterra.com -- native banner
?>
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?
Best Answer
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
Pictures about "Command to affect every player except myself"



How do you give effects to all players in Minecraft?
You can give a player an effect (ie: potion effect) or remove an effect from a player whenever you want using the /effect command in Minecraft....Add Effect using Effect ID.Effect IDAmplifierResult83Jump Boost IV3 more rowsWhat is the command to give someone an effect?
Using the effect command in Minecraft In order to give an effect, the syntax is: "/effect give <targets> <effect> [seconds] [amplifier] [hideParticles]". In order to remove an effect, it is: "/effect clear <targets> [effect]". The target tag refers to the username of the player.How do you use player damage commands?
To damage a player, set that player's damage scoreboard to how much damage you want to apply(negatives heal players), then run the function editor:deal_damage as the player you want to damage and you are done.Player made Command Block Creations are Next Level...
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Ivan Babydov, Leon Natan, sagar sintan, Truman Rexti