Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
VehicleExitEvent.java
1 package org.bukkit.event.vehicle;
2 
4 import org.bukkit.entity.Vehicle;
7 
8 /**
9  * Raised when a living entity exits a vehicle.
10  */
11 public class VehicleExitEvent extends VehicleEvent implements Cancellable {
12  private static final HandlerList handlers = new HandlerList();
13  private boolean cancelled;
14  private final LivingEntity exited;
15 
16  public VehicleExitEvent(final Vehicle vehicle, final LivingEntity exited) {
17  super(vehicle);
18  this.exited = exited;
19  }
20 
21  /**
22  * Get the living entity that exited the vehicle.
23  *
24  * @return The entity.
25  */
27  return exited;
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 }