Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
EntityPortalEnterEvent.java
1 package org.bukkit.event.entity;
2 
3 import org.bukkit.entity.Entity;
4 import org.bukkit.Location;
6 
7 /**
8  * Called when an entity comes into contact with a portal
9  */
10 public class EntityPortalEnterEvent extends EntityEvent {
11  private static final HandlerList handlers = new HandlerList();
12  private final Location location;
13 
14  public EntityPortalEnterEvent(final Entity entity, final Location location) {
15  super(entity);
16  this.location = location;
17  }
18 
19  /**
20  * Gets the portal block the entity is touching
21  *
22  * @return The portal block the entity is touching
23  */
24  public Location getLocation() {
25  return location;
26  }
27 
28  @Override
29  public HandlerList getHandlers() {
30  return handlers;
31  }
32 
33  public static HandlerList getHandlerList() {
34  return handlers;
35  }
36 }