summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/event/Event.java7
-rw-r--r--src/main/java/org/bukkit/event/vehicle/VehicleListener.java12
-rw-r--r--src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java5
3 files changed, 22 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/event/Event.java b/src/main/java/org/bukkit/event/Event.java
index 3eca4cdf..43807346 100644
--- a/src/main/java/org/bukkit/event/Event.java
+++ b/src/main/java/org/bukkit/event/Event.java
@@ -534,6 +534,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
*/
diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleListener.java b/src/main/java/org/bukkit/event/vehicle/VehicleListener.java
index 176b30c1..03088fd1 100644
--- a/src/main/java/org/bukkit/event/vehicle/VehicleListener.java
+++ b/src/main/java/org/bukkit/event/vehicle/VehicleListener.java
@@ -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) {
+ }
}
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index 5d959978..8dc65d3c 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -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: