Class VehicleDamageEvent

All Implemented Interfaces:
Cancellable
Direct Known Subclasses:
VehicleDamageByEntityEvent

public class VehicleDamageEvent extends VehicleEvent implements Cancellable
Is called when an entity takes damage
  • Constructor Details

    • VehicleDamageEvent

      @PowerNukkitOnly public VehicleDamageEvent(EntityVehicle vehicle, double damage)
      Constructor for the VehicleDamageEvent
      Parameters:
      vehicle - the damaged vehicle
      damage - the caused damage on the vehicle
  • Method Details

    • getHandlers

      public static HandlerList 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