Class VehicleCollisionEvent
java.lang.Object
org.bukkit.event.Event
nl.sbdeveloper.vehiclesplus.api.events.Event
nl.sbdeveloper.vehiclesplus.api.events.VehicleEvent<SpawnedVehicle>
nl.sbdeveloper.vehiclesplus.api.events.CancellableVehicleEvent<SpawnedVehicle>
nl.sbdeveloper.vehiclesplus.api.events.impl.VehicleCollisionEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
This event gets fired when a vehicle collides with another vehicle or another entity.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionVehicleCollisionEvent(SpawnedVehicle thisVehicle, SpawnedVehicle collidingVehicle, boolean vehicleDamaged, double collisionSpeed, HitboxSide collisionSide) VehicleCollisionEvent(SpawnedVehicle thisVehicle, org.bukkit.entity.Entity collidingEntity, boolean entityPushed, double collisionSpeed, HitboxSide collisionSide) -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.entity.EntityTheEntitythe vehicle collided with, or null if no entity collision.TheSpawnedVehiclethe vehicle collided with, or null if no vehicle collision.The side of the vehicle that was hitdoubleThe speed at which the collision occurred (km/h)booleanIf the entity the vehicle collided with that been pushed.booleanIf the vehicle has been damaged.Methods inherited from class nl.sbdeveloper.vehiclesplus.api.events.CancellableVehicleEvent
isCancelled, setCancelledMethods inherited from class nl.sbdeveloper.vehiclesplus.api.events.VehicleEvent
getVehicleMethods inherited from class nl.sbdeveloper.vehiclesplus.api.events.Event
getHandlerList, getHandlersMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
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
TheSpawnedVehiclethe vehicle collided with, or null if no vehicle collision. -
getCollidingEntity
public org.bukkit.entity.Entity getCollidingEntity()TheEntitythe 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
The side of the vehicle that was hit
-