All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bukkit.event.vehicle.VehicleBlockCollisionEvent Maven / Gradle / Ivy

There is a newer version: 2.4.0
Show newest version
package org.bukkit.event.vehicle;

import org.bukkit.block.Block;
import org.bukkit.entity.Vehicle;
import org.bukkit.event.HandlerList;

/**
 * Raised when a vehicle collides with a block.
 */
public class VehicleBlockCollisionEvent extends VehicleCollisionEvent {
  private static final HandlerList handlers = new HandlerList();
  private final Block block;

  public VehicleBlockCollisionEvent(final Vehicle vehicle, final Block block) {
    super(vehicle);
    this.block = block;
  }

  public static HandlerList getHandlerList() {
    return handlers;
  }

  /**
   * Gets the block the vehicle collided with
   *
   * @return the block the vehicle collided with
   */
  public Block getBlock() {
    return block;
  }

  @Override
  public HandlerList getHandlers() {
    return handlers;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy