How do I check for when a armor item is removed, to then remove, say, a potion effect?

Started by MilkShakeManiac on

Topic category: Troubleshooting, bugs, and solutions

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I check for when a armor item is removed, to then remove, say, a potion effect?

Hey Guys, I need some help. I'm making armor that when you equip a helmet, it will give you night vision, I got that working, but how do you remove the potion effect upon removal of said armor piece? I did ->  if (get armor from armor slot 3 of event/target entity == '''said armor piece'' ) {add potion effet }. that works but how do i do the logic for clearing potion effects.  if -> NOT-> (get armor from armor slot 3 of event/target entity == '''said armor piece'' ) {clear potion effect} is not working. Any Help would be greatly appreciated, thanks in advance guys.

 

 

 

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Create a procedure which…
Sat, 04/19/2025 - 18:42

Create a procedure which checks if you are wearing the armour and if so gives night vision for 2 ticks that way when you take it of it goes off(1 tick is to low and wont function)

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Bro, Thanks!! got it working…
Sun, 04/20/2025 - 10:25

Bro, Thanks!! got it working... But Why does the potion timer stop ticking by adding a (wait 60 ticks or whatever) { then do something}? Thanks for your time.