Package nl.mtvehicles.core.events
Class VehicleDamageEvent
java.lang.Object
org.bukkit.event.Event
nl.mtvehicles.core.infrastructure.models.MTVEvent
nl.mtvehicles.core.events.VehicleDamageEvent
- All Implemented Interfaces:
CanEditLicensePlate
,HasVehicle
,IsCancellable
,org.bukkit.event.Cancellable
public class VehicleDamageEvent
extends MTVEvent
implements IsCancellable, org.bukkit.event.Cancellable, CanEditLicensePlate
On vehicle damage
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Get the damage dealt to the vehicleorg.bukkit.entity.Entity
Get the entity that has damaged the vehicleGet license plate of the vehicle used in the eventvoid
setCancelled(boolean cancelled)
Sets the cancellation state of this event.void
setDamage(double damage)
Set new damage dealt to the vehiclevoid
setDamager(org.bukkit.entity.Entity damager)
Set the entity that has damaged the vehiclevoid
setLicensePlate(String licensePlate)
Set the license plate of the vehicle used in the eventMethods inherited from class nl.mtvehicles.core.infrastructure.models.MTVEvent
call, getHandlerList, getHandlers, getPlayer, isCancelled, setPlayer
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.bukkit.event.Cancellable
isCancelled
Methods inherited from interface nl.mtvehicles.core.events.interfaces.HasVehicle
getVehicle
-
Constructor Details
-
VehicleDamageEvent
public VehicleDamageEvent()
-
-
Method Details
-
setCancelled
public void setCancelled(boolean cancelled)Description copied from interface:IsCancellable
Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
- Specified by:
setCancelled
in interfaceIsCancellable
- Parameters:
cancelled
- true if you wish to cancel this event
-
getLicensePlate
Description copied from interface:HasVehicle
Get license plate of the vehicle used in the event- Specified by:
getLicensePlate
in interfaceHasVehicle
- Returns:
- Vehicle's license plate
-
setLicensePlate
Description copied from interface:CanEditLicensePlate
Set the license plate of the vehicle used in the event- Specified by:
setLicensePlate
in interfaceCanEditLicensePlate
- Parameters:
licensePlate
- New license plate
-
getDamager
public org.bukkit.entity.Entity getDamager()Get the entity that has damaged the vehicle- Returns:
- Damager
-
setDamager
public void setDamager(org.bukkit.entity.Entity damager)Set the entity that has damaged the vehicle- Parameters:
damager
- New damager
-
getDamage
public double getDamage()Get the damage dealt to the vehicle- Returns:
- Damage
-
setDamage
public void setDamage(double damage)Set new damage dealt to the vehicle- Parameters:
damage
- New damage
-