SPIGOT-5309: Call cancelled EntityDamageEvent when damaging invisible armor stands
By: jojokobi <jhocheneder@gmx.at>
This commit is contained in:
parent
20283452c6
commit
f73b0d238f
2 changed files with 33 additions and 10 deletions
|
@ -64,9 +64,10 @@
|
|||
+ // CraftBukkit end
|
||||
+ this.killEntity(); // CraftBukkit - this.die() -> this.killEntity()
|
||||
return false;
|
||||
} else if (!this.isInvulnerable(damagesource) && !this.bD && !this.isMarker()) {
|
||||
- } else if (!this.isInvulnerable(damagesource) && !this.bD && !this.isMarker()) {
|
||||
+ } else if (!this.isInvulnerable(damagesource) && (true || !this.bD) && !this.isMarker()) { // CraftBukkit
|
||||
+ // CraftBukkit start
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f)) {
|
||||
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f, true, this.bD)) { // PAIL: armorStandInvisible
|
||||
+ return false;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue