Package cn.nukkit.event.vehicle
Class VehicleDamageEvent
java.lang.Object
cn.nukkit.event.Event
cn.nukkit.event.vehicle.VehicleEvent
cn.nukkit.event.vehicle.VehicleDamageEvent
- All Implemented Interfaces:
Cancellable
- Direct Known Subclasses:
VehicleDamageByEntityEvent
Is called when an entity takes damage
-
Field Summary
-
Constructor Summary
ConstructorDescriptionVehicleDamageEvent
(EntityVehicle vehicle, double damage) Constructor for the VehicleDamageEvent -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the caused damage on the vehiclestatic HandlerList
void
setDamage
(double damage) Sets the damage caused on the vehicleMethods inherited from class cn.nukkit.event.vehicle.VehicleEvent
getVehicle
Methods inherited from class cn.nukkit.event.Event
getEventName, isCancelled, setCancelled, setCancelled
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface cn.nukkit.event.Cancellable
isCancelled, setCancelled, setCancelled
-
Constructor Details
-
VehicleDamageEvent
Constructor for the VehicleDamageEvent- Parameters:
vehicle
- the damaged vehicledamage
- the caused damage on the vehicle
-
-
Method Details
-
getHandlers
-
getDamage
public double getDamage()Returns the caused damage on the vehicle- Returns:
- caused damage on the vehicle
-
setDamage
public void setDamage(double damage) Sets the damage caused on the vehicle- Parameters:
damage
- the caused damage
-