Added VEHICLE_UPDATE

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot 2011-02-01 10:18:27 +00:00
parent 497ac626bf
commit 77b6112b65
3 changed files with 22 additions and 2 deletions

View file

@ -533,6 +533,13 @@ public abstract class Event {
*/
VEHICLE_MOVE (Category.VEHICLE),
/**
* Called when a vehicle is going through an update cycle, rechecking itself
*
* @see org.bukkit.event.vehicle.VehicleUpdateEvent
*/
VEHICLE_UPDATE (Category.VEHICLE),
/**
* MISCELLANEOUS EVENTS
*/

View file

@ -59,12 +59,20 @@ public class VehicleListener implements Listener {
*/
public void onVehicleExit(VehicleExitEvent event) {
}
/**
* Called when an vehicle moves.
*
*
* @param event
*/
public void onVehicleMove(VehicleMoveEvent event) {
}
/**
* Called when a vehicle goes through an update cycle
*
* @param event
*/
public void onVehicleUpdate(VehicleEvent event) {
}
}

View file

@ -345,6 +345,11 @@ public final class JavaPluginLoader implements PluginLoader {
((VehicleListener)listener).onVehicleMove( (VehicleMoveEvent)event );
}
};
case VEHICLE_UPDATE:
return new EventExecutor() { public void execute( Listener listener, Event event ) {
((VehicleListener)listener).onVehicleUpdate((VehicleEvent)event);
}
};
// Custom Events
case CUSTOM_EVENT: