Class VehicleDespawnEvent
java.lang.Object
org.bukkit.event.Event
nl.sbdeveloper.vehiclesplus.api.events.Event
nl.sbdeveloper.vehiclesplus.api.events.VehicleEvent<SpawnedVehicle>
nl.sbdeveloper.vehiclesplus.api.events.CancellableVehicleEvent<SpawnedVehicle>
nl.sbdeveloper.vehiclesplus.api.events.impl.VehicleDespawnEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
This event gets fired when a
SpawnedVehicle gets despawned.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionVehicleDespawnEvent(SpawnedVehicle vehicle, boolean force, org.bukkit.entity.Player despawner) Construct a newVehicleDespawnEvent.VehicleDespawnEvent(SpawnedVehicle vehicle, VehicleDespawnEvent.DespawnReason reason, boolean force) Construct a newVehicleDespawnEvent. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.entity.PlayerThePlayerthat despawns the vehicle.The reason why the vehicle gets despawned.booleanisForce()Whether the vehicle is forced to despawn.voidsetCancelled(boolean cancelled) Set if this event gets cancelled.Methods inherited from class nl.sbdeveloper.vehiclesplus.api.events.CancellableVehicleEvent
isCancelledMethods inherited from class nl.sbdeveloper.vehiclesplus.api.events.VehicleEvent
getVehicleMethods inherited from class nl.sbdeveloper.vehiclesplus.api.events.Event
getHandlerList, getHandlersMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
VehicleDespawnEvent
public VehicleDespawnEvent(SpawnedVehicle vehicle, VehicleDespawnEvent.DespawnReason reason, boolean force) Construct a newVehicleDespawnEvent.- Parameters:
vehicle- TheSpawnedVehiclethat gets despawned.
-
VehicleDespawnEvent
public VehicleDespawnEvent(SpawnedVehicle vehicle, boolean force, @Nullable org.bukkit.entity.Player despawner) Construct a newVehicleDespawnEvent.- Parameters:
vehicle- TheSpawnedVehiclethat gets despawned.despawner- ThePlayerthat despawns the vehicle.
-
-
Method Details
-
setCancelled
public void setCancelled(boolean cancelled) Description copied from class:CancellableVehicleEventSet if this event gets cancelled.- Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable- Overrides:
setCancelledin classCancellableVehicleEvent<SpawnedVehicle>- Parameters:
cancelled- true if you wish to cancel this event
-
getReason
The reason why the vehicle gets despawned. -
isForce
public boolean isForce()Whether the vehicle is forced to despawn. -
getDespawner
@Nullable public org.bukkit.entity.Player getDespawner()ThePlayerthat despawns the vehicle.
-