diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-02-01 10:18:27 +0000 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-02-01 10:18:27 +0000 |
commit | 630f9a89d6e14f3ca1fe194fa418baabf4491757 (patch) | |
tree | 8e7a4b99b2b50932fe3162c65b7a2a069774b2ed /src | |
parent | 000d2a300f3928fde7b6ce6d5261e6e1a873de60 (diff) | |
download | bukkit-630f9a89d6e14f3ca1fe194fa418baabf4491757.tar bukkit-630f9a89d6e14f3ca1fe194fa418baabf4491757.tar.gz bukkit-630f9a89d6e14f3ca1fe194fa418baabf4491757.tar.lz bukkit-630f9a89d6e14f3ca1fe194fa418baabf4491757.tar.xz bukkit-630f9a89d6e14f3ca1fe194fa418baabf4491757.zip |
Added VEHICLE_UPDATE
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/event/Event.java | 7 | ||||
-rw-r--r-- | src/main/java/org/bukkit/event/vehicle/VehicleListener.java | 12 | ||||
-rw-r--r-- | src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java | 5 |
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: |