Fix potion effect type removal (#11778)

An incorrectly updated hunk attempted to remove the MobEffectInstance
from the active effect map instead of the Holder<MobEffect> as the
parameter name was changed from holder to effect during hardfork.
This commit is contained in:
Bjarne Koll 2024-12-23 04:51:58 +01:00 committed by GitHub
parent eb793c3131
commit f8bf600375
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -388,7 +388,6 @@
@Nullable
public MobEffectInstance removeEffectNoUpdate(Holder<MobEffect> effect) {
- return this.activeEffects.remove(effect);
+ // CraftBukkit start
+ return this.removeEffectNoUpdate(effect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.UNKNOWN);
+ }
@ -410,7 +409,7 @@
+ return null;
+ }
+
+ return this.activeEffects.remove(effectInstance);
return this.activeEffects.remove(effect);
}
public boolean removeEffect(Holder<MobEffect> effect) {