Added get/setLastDamageCause. Thanks sunkid!

This commit is contained in:
EvilSeph
2011-05-16 00:20:58 -04:00
parent 86ca0f5c67
commit 7c9b2b9f40
2 changed files with 16 additions and 3 deletions

View File

@@ -14,15 +14,15 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
private DamageCause cause;
public EntityDamageEvent(Entity damagee, DamageCause cause, int damage) {
super(Event.Type.ENTITY_DAMAGE, damagee);
this.cause = cause;
this.damage = damage;
this(Event.Type.ENTITY_DAMAGE, damagee, cause, damage);
}
protected EntityDamageEvent(Event.Type type, Entity damagee, DamageCause cause, int damage) {
super(type, damagee);
this.cause = cause;
this.damage = damage;
damagee.setLastDamageCause(this);
}
/**