Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
EntityEvent.java
1 package org.bukkit.event.entity;
2 
3 import org.bukkit.entity.Entity;
5 import org.bukkit.event.Event;
6 
7 /**
8  * Represents an Entity-related event
9  */
10 public abstract class EntityEvent extends Event {
11  protected Entity entity;
12 
13  public EntityEvent(final Entity what) {
14  entity = what;
15  }
16 
17  /**
18  * Returns the Entity involved in this event
19  *
20  * @return Entity who is involved in this event
21  */
22  public Entity getEntity() {
23  return entity;
24  }
25 
26  /**
27  * Gets the EntityType of the Entity involved in this event.
28  *
29  * @return EntityType of the Entity involved in this event
30  */
32  return entity.getType();
33  }
34 }