3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 04:50:05 +01:00

SPIGOT-3040: Round health to float for validation

Dieser Commit ist enthalten in:
md_5 2017-01-28 11:41:09 +11:00
Ursprung 80dd971b52
Commit c1aa85918e

Datei anzeigen

@ -91,8 +91,9 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
public void setHealth(double health) {
health = (float) health;
if ((health < 0) || (health > getMaxHealth())) {
throw new IllegalArgumentException("Health must be between 0 and " + getMaxHealth());
throw new IllegalArgumentException("Health must be between 0 and " + getMaxHealth() + "(" + health + ")");
}
if (health == 0) {