How to clear all potion effects?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

pepper82

Member
Jan 26, 2017
272
1
18
41
Hi all,
I tried many things but it just won't work. my latest try:

loop all active potions on {_p}:
broadcast loop-value
remove loop-value from {_p}


also tried:

remove all potion effects from {_p}


p = player variable.

It broadcasts all the active potion effects but it just does not remove it...
And I do not want to use minecraft's effect clear command.

Any suggestions?
 
if you have skellet you can do
code_language.skript:
milk {_p}
 
Hi all,
I tried many things but it just won't work. my latest try:

loop all active potions on {_p}:
broadcast loop-value
remove loop-value from {_p}


also tried:

remove all potion effects from {_p}


p = player variable.

It broadcasts all the active potion effects but it just does not remove it...
And I do not want to use minecraft's effect clear command.

Any suggestions?

https://skriptlang.github.io/Skript/effects.html#EffPotion

Variables with underscore not working in another events, only just where you set it. Try {p}

lol it not worked for me too

code_language.skript:
execute console command "effect %{_p}% clear"
 
Last edited:
Then if you have Essentials on your server,
code_language.skript:
execute console command "effect %{_p}% clear"
Why do you need Essentials for that? It's a vanilla command. Note though that in 1.13 it was changed to "/effect clear <entity>" so you'd need to switch the order if you're on 1.13.
 
Status
Not open for further replies.