Properly clear attributes on remove and death. Fixes BUKKIT-4416

This commit is contained in:
EvilSeph committed 2013-07-03 00:25:31 -04:00
1 parent adcb293a03
commit c00db5f751
2 files changed
+2 -7

No files matched your search

@@ -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() {