diff options
author | EvilSeph <evilseph@gmail.com> | 2013-07-03 00:23:34 -0400 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2013-07-03 00:25:31 -0400 |
commit | c00db5f751bd0d96298dc17e39d8befb6dc9b29c (patch) | |
tree | 59086a86fbfac608cb69dae281059cfa9aab887e /src/main/java/org | |
parent | adcb293a036c88a4977f05bb5ff4e0d91b8ec9d1 (diff) | |
download | craftbukkit-c00db5f751bd0d96298dc17e39d8befb6dc9b29c.tar craftbukkit-c00db5f751bd0d96298dc17e39d8befb6dc9b29c.tar.gz craftbukkit-c00db5f751bd0d96298dc17e39d8befb6dc9b29c.tar.lz craftbukkit-c00db5f751bd0d96298dc17e39d8befb6dc9b29c.tar.xz craftbukkit-c00db5f751bd0d96298dc17e39d8befb6dc9b29c.zip |
Properly clear attributes on remove and death. Fixes BUKKIT-4416
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index da7a2af9..1d52866e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -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() { |