Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 13:00:06 +01:00
Properly clear attributes on remove and death. Fixes BUKKIT-4416
Dieser Commit ist enthalten in:
Ursprung
adcb293a03
Commit
c00db5f751
@ -914,7 +914,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|||||||
this.expTotal = this.newTotalExp;
|
this.expTotal = this.newTotalExp;
|
||||||
this.exp = 0;
|
this.exp = 0;
|
||||||
this.deathTicks = 0;
|
this.deathTicks = 0;
|
||||||
this.effects.clear();
|
this.aG(); // Should be removeAllEffects.
|
||||||
this.updateEffects = true;
|
this.updateEffects = true;
|
||||||
this.activeContainer = this.defaultContainer;
|
this.activeContainer = this.defaultContainer;
|
||||||
this.killer = null;
|
this.killer = null;
|
||||||
|
@ -275,12 +275,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void removePotionEffect(PotionEffectType type) {
|
public void removePotionEffect(PotionEffectType type) {
|
||||||
getHandle().effects.remove(type.getId());
|
getHandle().k(type.getId()); // Should be removeEffect.
|
||||||
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)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Collection<PotionEffect> getActivePotionEffects() {
|
public Collection<PotionEffect> getActivePotionEffects() {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren