001 package org.bukkit.event.vehicle; 002 003 import org.bukkit.block.Block; 004 import org.bukkit.entity.Vehicle; 005 import org.bukkit.event.HandlerList; 006 007 /** 008 * Raised when a vehicle collides with a block. 009 */ 010 public class VehicleBlockCollisionEvent extends VehicleCollisionEvent { 011 private static final HandlerList handlers = new HandlerList(); 012 private final Block block; 013 014 public VehicleBlockCollisionEvent(final Vehicle vehicle, final Block block) { 015 super(vehicle); 016 this.block = block; 017 } 018 019 /** 020 * Gets the block the vehicle collided with 021 * 022 * @return the block the vehicle collided with 023 */ 024 public Block getBlock() { 025 return block; 026 } 027 028 @Override 029 public HandlerList getHandlers() { 030 return handlers; 031 } 032 033 public static HandlerList getHandlerList() { 034 return handlers; 035 } 036 }