Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
EntityDamageByEntityEvent.java
1 package org.bukkit.event.entity;
2 
3 import org.bukkit.entity.Entity;
4 
5 /**
6  * Called when an entity is damaged by an entity
7  */
9  private final Entity damager;
10 
11  @Deprecated
12  public EntityDamageByEntityEvent(final Entity damager, final Entity damagee, final DamageCause cause, final int damage) {
13  this(damager, damagee, cause, (double) damage);
14  }
15 
16  public EntityDamageByEntityEvent(final Entity damager, final Entity damagee, final DamageCause cause, final double damage) {
17  super(damagee, cause, damage);
18  this.damager = damager;
19  }
20 
21  /**
22  * Returns the entity that damaged the defender.
23  *
24  * @return Entity that damaged the defender.
25  */
26  public Entity getDamager() {
27  return damager;
28  }
29 }