Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.event.vehicle.VehicleDamageEvent Class Reference
Inheritance diagram for org.bukkit.event.vehicle.VehicleDamageEvent:
org.bukkit.event.vehicle.VehicleEvent org.bukkit.event.Cancellable org.bukkit.event.Event

Public Member Functions

 VehicleDamageEvent (final Vehicle vehicle, final Entity attacker, final int damage)
 
 VehicleDamageEvent (final Vehicle vehicle, final Entity attacker, final double damage)
 
Entity getAttacker ()
 
double getDamage ()
 
int _INVALID_getDamage ()
 
void setDamage (double damage)
 
void _INVALID_setDamage (int damage)
 
boolean isCancelled ()
 
void setCancelled (boolean cancel)
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.vehicle.VehicleEvent
 VehicleEvent (final Vehicle vehicle)
 
final Vehicle getVehicle ()
 
- Public Member Functions inherited from org.bukkit.event.Event
 Event ()
 
 Event (boolean isAsync)
 
String getEventName ()
 
abstract HandlerList getHandlers ()
 
final boolean isAsynchronous ()
 

Static Public Member Functions

static HandlerList getHandlerList ()
 

Additional Inherited Members

- Protected Attributes inherited from org.bukkit.event.vehicle.VehicleEvent
Vehicle vehicle
 

Detailed Description

Raised when a vehicle receives damage.

Definition at line 12 of file VehicleDamageEvent.java.

Member Function Documentation

int org.bukkit.event.vehicle.VehicleDamageEvent._INVALID_getDamage ( )

This method exists for legacy reasons to provide backwards compatibility. It will not exist at runtime and should not be used under any circumstances.

Definition at line 53 of file VehicleDamageEvent.java.

References org.bukkit.event.vehicle.VehicleDamageEvent.getDamage().

53  {
54  return NumberConversions.ceil(getDamage());
55  }
void org.bukkit.event.vehicle.VehicleDamageEvent._INVALID_setDamage ( int  damage)

This method exists for legacy reasons to provide backwards compatibility. It will not exist at runtime and should not be used under any circumstances.

Definition at line 72 of file VehicleDamageEvent.java.

References org.bukkit.event.vehicle.VehicleDamageEvent.setDamage().

72  {
73  setDamage(damage);
74  }
Entity org.bukkit.event.vehicle.VehicleDamageEvent.getAttacker ( )

Gets the Entity that is attacking the vehicle

Returns
the Entity that is attacking the vehicle

Definition at line 34 of file VehicleDamageEvent.java.

34  {
35  return attacker;
36  }
double org.bukkit.event.vehicle.VehicleDamageEvent.getDamage ( )

Gets the damage done to the vehicle

Returns
the damage done to the vehicle

Definition at line 43 of file VehicleDamageEvent.java.

Referenced by org.bukkit.event.vehicle.VehicleDamageEvent._INVALID_getDamage().

43  {
44  return damage;
45  }
boolean org.bukkit.event.vehicle.VehicleDamageEvent.isCancelled ( )

Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins

Returns
true if this event is cancelled

Implements org.bukkit.event.Cancellable.

Definition at line 76 of file VehicleDamageEvent.java.

76  {
77  return cancelled;
78  }
void org.bukkit.event.vehicle.VehicleDamageEvent.setCancelled ( boolean  cancel)

Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Parameters
canceltrue if you wish to cancel this event

Implements org.bukkit.event.Cancellable.

Definition at line 80 of file VehicleDamageEvent.java.

80  {
81  this.cancelled = cancel;
82  }
void org.bukkit.event.vehicle.VehicleDamageEvent.setDamage ( double  damage)

Sets the damage done to the vehicle

Parameters
damageThe damage

Definition at line 62 of file VehicleDamageEvent.java.

Referenced by org.bukkit.event.vehicle.VehicleDamageEvent._INVALID_setDamage().

62  {
63  this.damage = damage;
64  }

The documentation for this class was generated from the following file: