13
0
geforkt von Mirrors/Paper

Don't set health directly, will interfere with scoreboard system.

Dieser Commit ist enthalten in:
Travis Watkins 2013-03-16 08:57:57 -05:00
Ursprung 7466321212
Commit 5903b9f5ca

Datei anzeigen

@ -642,12 +642,12 @@ public abstract class EntityLiving extends Entity {
this.world.getServer().getPluginManager().callEvent(event);
if (!event.isCancelled()) {
this.health += event.getAmount();
this.setHealth(this.getHealth() + event.getAmount());
}
// this.getMaxHealth() -> this.maxHealth
if (this.health > this.maxHealth) {
this.health = this.maxHealth;
this.setHealth(this.maxHealth);
// CraftBukkit end
}