13
0
geforkt von Mirrors/Paper

SPIGOT-2559: Kill all entities when called with setHealth(0)

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2016-07-30 10:06:07 +10:00
Ursprung bd38417962
Commit 1e446f7eac

Datei anzeigen

@ -95,8 +95,8 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
throw new IllegalArgumentException("Health must be between 0 and " + getMaxHealth());
}
if (entity instanceof EntityPlayer && health == 0) {
((EntityPlayer) entity).die(DamageSource.GENERIC);
if (health == 0) {
getHandle().die(DamageSource.GENERIC);
}
getHandle().setHealth((float) health);