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.Entity
TheEntity
the vehicle collided with, or null if no entity collision.TheSpawnedVehicle
the vehicle collided with, or null if no vehicle collision.The side of the vehicle that was hitdouble
The speed at which the collision occurred (km/h)boolean
If the entity the vehicle collided with that been pushed.boolean
If the vehicle has been damaged.Methods inherited from class nl.sbdeveloper.vehiclesplus.api.events.CancellableVehicleEvent
isCancelled, setCancelled
Methods inherited from class nl.sbdeveloper.vehiclesplus.api.events.VehicleEvent
getVehicle
Methods inherited from class nl.sbdeveloper.vehiclesplus.api.events.Event
getHandlerList, getHandlers
Methods 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
TheSpawnedVehicle
the vehicle collided with, or null if no vehicle collision. -
getCollidingEntity
public org.bukkit.entity.Entity getCollidingEntity()TheEntity
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
The side of the vehicle that was hit
-