How to give potion effects to everyone on a certain team

How to give potion effects to everyone on a certain team - Crop diverse friends hiking and giving hands to each other

So I'm making a kind of kit PVP game called classes, where you join a team, let's say, the barbarian. You can't hit any other barbarians, and it shows everyone else with the same class. But I want people with certain classes to have special effects how do I do that?

I tried:

/effect 1 1000000 5 @a[barbarian]

But it didn't work. I am running 1.9



Best Answer

/effect @a[team=teamname] 1 1000000 5 would set an effect to all players on a certain team, where teamname is the name of the team that you want to give the effect to.




Pictures about "How to give potion effects to everyone on a certain team"

How to give potion effects to everyone on a certain team - Pensive aged man giving high five to friend
How to give potion effects to everyone on a certain team - Colleagues working in warehouse with barrels
How to give potion effects to everyone on a certain team - Free stock photo of adult, brainstorming, business



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 rows

How do you give people potion effects?

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]".

How do you give a player a permanent potion effect in Minecraft?

To give all players a potion that has the Night Vision effect:
  • /give @a potion{Potion:"minecraft:night_vision"} 1 \u200c [JavaEditiononly]
  • /give @a potion 1 5 \u200c [BedrockEditiononly]




  • How to give a mob potion effects (forever) through commands.




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Kamaji Ogino, Anna Shvets, Quang Nguyen Vinh, Mikhail Nilov