me.legofreak107.vehiclesplus.vehicles.api.events

## Class VehicleCollisionEvent

- java.lang.Object
- - org.bukkit.event.Event
  - - me.legofreak107.vehiclesplus.vehicles.api.events.VehicleCollisionEvent

All Implemented Interfaces:
  org.bukkit.event.Cancellable

    public class VehicleCollisionEvent
    extends org.bukkit.event.Event
    implements org.bukkit.event.Cancellable

### Nested Class Summary

### Nested classes/interfaces inherited from class org.bukkit.event.Event

`org.bukkit.event.Event.Result`

### Constructor Summary

Constructors
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

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`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

### Methods inherited from class org.bukkit.event.Event

`getEventName, isAsynchronous`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### VehicleCollisionEvent

    public VehicleCollisionEvent(SpawnedVehicle vehicle,
                                 SpawnedVehicle collisionVehicle)

This event is triggered when a vehicle hits another vehicle

Parameters:
  `vehicle` - the vehicle triggering the event
  `collisionVehicle` - the vehicle that got hit by the triggering vehicle

#### VehicleCollisionEvent

    public VehicleCollisionEvent(SpawnedVehicle vehicle,
                                 org.bukkit.entity.Entity collisionEntity)

This event is triggered when a vehicle hits another entity

Parameters:
  `vehicle` - the vehicle triggering the event
  `collisionEntity` - the entity that got hit by the triggering vehicle

### Method Detail

#### getHandlerList

    public static org.bukkit.event.HandlerList getHandlerList()

#### isCancelled

    public boolean isCancelled()

Check if event is cancelled

Specified by:
  `isCancelled` in interface `org.bukkit.event.Cancellable`
Returns:
  boolean

#### setCancelled

    public void setCancelled(boolean cancel)

Set event cancelled

Specified by:
  `setCancelled` in interface `org.bukkit.event.Cancellable`
Parameters:
  `cancel` - True if you want to cancel this event

#### getHandlers

    public org.bukkit.event.HandlerList getHandlers()

Specified by:
  `getHandlers` in class `org.bukkit.event.Event`

#### getCollisionVehicle

    public SpawnedVehicle getCollisionVehicle()

Get collision vehicle

Returns:
  Vehicle

#### getVehicle

    public SpawnedVehicle getVehicle()

Get vehicle

Returns:
  Vehicle

#### getCollisionEntity

    public org.bukkit.entity.Entity getCollisionEntity()

Get collision entity

Returns:
  Entity

#### getCollisionMode

    public CollisionMode getCollisionMode()

Get collision mode

Returns:
  CollisionMode

#### doPush

    public boolean doPush()

Push vehicle/entity after collision

Returns:
  boolean

#### setDoPush

    public void setDoPush(boolean push)

Set push vehicle/entity after collision

Parameters:
  `push` - True if you want to push the vehicle or entity

#### doDamage

    public boolean doDamage()

Damage vehicle/entity after collision

Returns:
  boolean

#### setDoDamage

    public void setDoDamage(boolean damage)

Set damage vehicle/entity after collision

Parameters:
  `damage` - True if you wan to damage the vehicle or entity