mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Added VEHICLE_UPDATE
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
497ac626bf
commit
77b6112b65
3 changed files with 22 additions and 2 deletions
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue