Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
VehicleEnterEvent.java
1 package org.bukkit.event.vehicle;
2 
3 import org.bukkit.entity.Entity;
4 import org.bukkit.entity.Vehicle;
7 
8 /**
9  * Raised when an entity enters a vehicle.
10  */
11 public class VehicleEnterEvent extends VehicleEvent implements Cancellable {
12  private static final HandlerList handlers = new HandlerList();
13  private boolean cancelled;
14  private final Entity entered;
15 
16  public VehicleEnterEvent(final Vehicle vehicle, final Entity entered) {
17  super(vehicle);
18  this.entered = entered;
19  }
20 
21  /**
22  * Gets the Entity that entered the vehicle.
23  *
24  * @return the Entity that entered the vehicle
25  */
26  public Entity getEntered() {
27  return entered;
28  }
29 
30  public boolean isCancelled() {
31  return cancelled;
32  }
33 
34  public void setCancelled(boolean cancel) {
35  this.cancelled = cancel;
36  }
37 
38  @Override
39  public HandlerList getHandlers() {
40  return handlers;
41  }
42 
43  public static HandlerList getHandlerList() {
44  return handlers;
45  }
46 }