001    package org.bukkit.event.vehicle;
002    
003    import org.bukkit.entity.LivingEntity;
004    import org.bukkit.entity.Vehicle;
005    import org.bukkit.event.Cancellable;
006    import org.bukkit.event.HandlerList;
007    
008    /**
009     * Raised when a living entity exits a vehicle.
010     */
011    public class VehicleExitEvent extends VehicleEvent implements Cancellable {
012        private static final HandlerList handlers = new HandlerList();
013        private boolean cancelled;
014        private final LivingEntity exited;
015    
016        public VehicleExitEvent(final Vehicle vehicle, final LivingEntity exited) {
017            super(vehicle);
018            this.exited = exited;
019        }
020    
021        /**
022         * Get the living entity that exited the vehicle.
023         *
024         * @return The entity.
025         */
026        public LivingEntity getExited() {
027            return exited;
028        }
029    
030        public boolean isCancelled() {
031            return cancelled;
032        }
033    
034        public void setCancelled(boolean cancel) {
035            this.cancelled = cancel;
036        }
037    
038        @Override
039        public HandlerList getHandlers() {
040            return handlers;
041        }
042    
043        public static HandlerList getHandlerList() {
044            return handlers;
045        }
046    }