13
0
geforkt von Mirrors/Paper

[Bleeding] setLastDamageCaused to ComplexEntityPart parent.

By: Feildmaster <admin@feildmaster.com>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2012-02-08 16:14:33 -06:00
Ursprung cb2fe27653
Commit 4363ae55e0

Datei anzeigen

@ -1,5 +1,6 @@
package org.bukkit.event.entity; package org.bukkit.event.entity;
import org.bukkit.entity.ComplexEntityPart;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
import org.bukkit.event.Event; import org.bukkit.event.Event;
@ -25,7 +26,11 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
this.cause = cause; this.cause = cause;
this.damage = damage; this.damage = damage;
damagee.setLastDamageCause(this); if (damagee instanceof ComplexEntityPart) {
((ComplexEntityPart) damagee).getParent().setLastDamageCause(this);
} else {
damagee.setLastDamageCause(this);
}
} }
public boolean isCancelled() { public boolean isCancelled() {