Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
VehicleMoveEvent.java
1 package org.bukkit.event.vehicle;
2 
3 import org.bukkit.Location;
4 import org.bukkit.entity.Vehicle;
6 
7 /**
8  * Raised when a vehicle moves.
9  */
10 public class VehicleMoveEvent extends VehicleEvent {
11  private static final HandlerList handlers = new HandlerList();
12  private final Location from;
13  private final Location to;
14 
15  public VehicleMoveEvent(final Vehicle vehicle, final Location from, final Location to) {
16  super(vehicle);
17 
18  this.from = from;
19  this.to = to;
20  }
21 
22  /**
23  * Get the previous position.
24  *
25  * @return Old position.
26  */
27  public Location getFrom() {
28  return from;
29  }
30 
31  /**
32  * Get the next position.
33  *
34  * @return New position.
35  */
36  public Location getTo() {
37  return to;
38  }
39 
40 
41  @Override
42  public HandlerList getHandlers() {
43  return handlers;
44  }
45 
46  public static HandlerList getHandlerList() {
47  return handlers;
48  }
49 }