mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:21:37 +01:00
Properly clear attributes on remove and death. Fixes BUKKIT-4416
By: EvilSeph <evilseph@gmail.com>
This commit is contained in:
parent
48a3e72018
commit
6addfb0dff
@ -275,12 +275,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
}
|
||||
|
||||
public void removePotionEffect(PotionEffectType type) {
|
||||
getHandle().effects.remove(type.getId());
|
||||
getHandle().updateEffects = true;
|
||||
if (getHandle() instanceof EntityPlayer) {
|
||||
if (((EntityPlayer) getHandle()).playerConnection == null) return;
|
||||
((EntityPlayer) getHandle()).playerConnection.sendPacket(new Packet42RemoveMobEffect(getHandle().id, new MobEffect(type.getId(), 0, 0)));
|
||||
}
|
||||
getHandle().k(type.getId()); // Should be removeEffect.
|
||||
}
|
||||
|
||||
public Collection<PotionEffect> getActivePotionEffects() {
|
||||
|
Loading…
Reference in New Issue
Block a user