geforkt von Mirrors/Paper
Don't set health directly, will interfere with scoreboard system.
Dieser Commit ist enthalten in:
Ursprung
7466321212
Commit
5903b9f5ca
@ -642,12 +642,12 @@ public abstract class EntityLiving extends Entity {
|
|||||||
this.world.getServer().getPluginManager().callEvent(event);
|
this.world.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
this.health += event.getAmount();
|
this.setHealth(this.getHealth() + event.getAmount());
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.getMaxHealth() -> this.maxHealth
|
// this.getMaxHealth() -> this.maxHealth
|
||||||
if (this.health > this.maxHealth) {
|
if (this.health > this.maxHealth) {
|
||||||
this.health = this.maxHealth;
|
this.setHealth(this.maxHealth);
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren