Jump to content

how to remove potion effects using a command?


moxious

Recommended Posts

I am trying to figure out how to make a command that does this:

command /teamone:

                  trigger:

                             remove all active potion effects from player

                             wait 5 ticks

                             apply potion of strength I to player for 999 days

 

the line "remove all active potion effects from player" is where I am having issues, I don't know the proper syntax for that. I have tried milk player, other wordings, etc.. I have also tried execute console command /effect clear @p but that didn't work either.

improper indentation I know but it's just an example.

the purpose of this is to choose a team, and each team gives you a separate effect. if I could utilize tags or something to make it easier, that would be helpful. 

each team gives: strength I, fire resistance, jump boost 2, water breathing & resistance I, and night vision & speed I.

Link to comment
Share on other sites

@p cant be run through console cause the player selector wont trigger for the player via console.
if you wanted to do command: console command "effect clear %player%" would be the syntax.
You can also remove %potioneffect% from player's active potion effects
or
clear player's active potion effects
 

Edited by Bluberriess
  • Thanks 1

 


[PATRON] Echology

image.png.25b196fc30999f9133398315a98c2b11.png

Sponk = Weeb


 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...