public class VehicleCollisionEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
Constructor and Description |
---|
VehicleCollisionEvent(SpawnedVehicle vehicle,
org.bukkit.entity.Entity collisionEntity)
This event is triggered when a vehicle hits another entity
|
VehicleCollisionEvent(SpawnedVehicle vehicle,
SpawnedVehicle collisionVehicle)
This event is triggered when a vehicle hits another vehicle
|
Modifier and Type | Method and Description |
---|---|
boolean |
doDamage()
Damage vehicle/entity after collision
|
boolean |
doPush()
Push vehicle/entity after collision
|
org.bukkit.entity.Entity |
getCollisionEntity()
Get collision entity
|
CollisionMode |
getCollisionMode()
Get collision mode
|
SpawnedVehicle |
getCollisionVehicle()
Get collision vehicle
|
static org.bukkit.event.HandlerList |
getHandlerList() |
org.bukkit.event.HandlerList |
getHandlers() |
SpawnedVehicle |
getVehicle()
Get vehicle
|
boolean |
isCancelled()
Check if event is cancelled
|
void |
setCancelled(boolean cancel)
Set event cancelled
|
void |
setDoDamage(boolean damage)
Set damage vehicle/entity after collision
|
void |
setDoPush(boolean push)
Set push vehicle/entity after collision
|
public VehicleCollisionEvent(SpawnedVehicle vehicle, SpawnedVehicle collisionVehicle)
vehicle
- the vehicle triggering the eventcollisionVehicle
- the vehicle that got hit by the triggering vehiclepublic VehicleCollisionEvent(SpawnedVehicle vehicle, org.bukkit.entity.Entity collisionEntity)
vehicle
- the vehicle triggering the eventcollisionEntity
- the entity that got hit by the triggering vehiclepublic static org.bukkit.event.HandlerList getHandlerList()
public boolean isCancelled()
isCancelled
in interface org.bukkit.event.Cancellable
public void setCancelled(boolean cancel)
setCancelled
in interface org.bukkit.event.Cancellable
cancel
- True if you want to cancel this eventpublic org.bukkit.event.HandlerList getHandlers()
getHandlers
in class org.bukkit.event.Event
public SpawnedVehicle getCollisionVehicle()
public SpawnedVehicle getVehicle()
public org.bukkit.entity.Entity getCollisionEntity()
public CollisionMode getCollisionMode()
public boolean doPush()
public void setDoPush(boolean push)
push
- True if you want to push the vehicle or entitypublic boolean doDamage()
public void setDoDamage(boolean damage)
damage
- True if you wan to damage the vehicle or entity