Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
SPIGOT-2559: Kill all entities when called with setHealth(0)
Dieser Commit ist enthalten in:
Ursprung
8cc5958404
Commit
83a9dbdef6
@ -95,8 +95,8 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|||||||
throw new IllegalArgumentException("Health must be between 0 and " + getMaxHealth());
|
throw new IllegalArgumentException("Health must be between 0 and " + getMaxHealth());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity instanceof EntityPlayer && health == 0) {
|
if (health == 0) {
|
||||||
((EntityPlayer) entity).die(DamageSource.GENERIC);
|
getHandle().die(DamageSource.GENERIC);
|
||||||
}
|
}
|
||||||
|
|
||||||
getHandle().setHealth((float) health);
|
getHandle().setHealth((float) health);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren