Class VehicleCollisionEvent

All Implemented Interfaces:
org.bukkit.event.Cancellable

public class VehicleCollisionEvent extends CancellableVehicleEvent<SpawnedVehicle>
This event gets fired when a vehicle collides with another vehicle or another entity.
  • Constructor Details

    • VehicleCollisionEvent

      public VehicleCollisionEvent(SpawnedVehicle thisVehicle, SpawnedVehicle collidingVehicle, boolean vehicleDamaged, double collisionSpeed, HitboxSide collisionSide)
    • VehicleCollisionEvent

      public VehicleCollisionEvent(SpawnedVehicle thisVehicle, org.bukkit.entity.Entity collidingEntity, boolean entityPushed, double collisionSpeed, HitboxSide collisionSide)
  • Method Details

    • getCollidingVehicle

      public SpawnedVehicle getCollidingVehicle()
      The SpawnedVehicle the vehicle collided with, or null if no vehicle collision.
    • getCollidingEntity

      public org.bukkit.entity.Entity getCollidingEntity()
      The Entity the vehicle collided with, or null if no entity collision.
    • isVehicleDamaged

      public boolean isVehicleDamaged()
      If the vehicle has been damaged.
    • isEntityPushed

      public boolean isEntityPushed()
      If the entity the vehicle collided with that been pushed.
    • getCollisionSpeed

      public double getCollisionSpeed()
      The speed at which the collision occurred (km/h)
    • getCollisionSide

      public HitboxSide getCollisionSide()
      The side of the vehicle that was hit