Implemented vehicle hooks (some changes will still be made).
This commit is contained in:
40
src/main/java/org/bukkit/event/vehicle/VehicleMoveEvent.java
Normal file
40
src/main/java/org/bukkit/event/vehicle/VehicleMoveEvent.java
Normal file
@@ -0,0 +1,40 @@
|
||||
package org.bukkit.event.vehicle;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Vehicle;
|
||||
|
||||
/**
|
||||
* Raised when a vehicle moves.
|
||||
*
|
||||
* @author sk89q
|
||||
*/
|
||||
public class VehicleMoveEvent extends VehicleEvent {
|
||||
private Location from;
|
||||
private Location to;
|
||||
|
||||
public VehicleMoveEvent(Type type, Vehicle vehicle,
|
||||
Location from, Location to) {
|
||||
super(type, vehicle);
|
||||
|
||||
this.from = from;
|
||||
this.to = to;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the previous position.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Location getFrom() {
|
||||
return from;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the next position.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Location getTo() {
|
||||
return to;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user