Package nl.mtvehicles.core.events
Class VehicleAddRiderEvent
java.lang.Object
org.bukkit.event.Event
nl.mtvehicles.core.infrastructure.models.MTVEvent
nl.mtvehicles.core.events.VehicleAddRiderEvent
- All Implemented Interfaces:
CanEditLicensePlate,HasVehicle,IsCancellable,org.bukkit.event.Cancellable
public class VehicleAddRiderEvent
extends MTVEvent
implements IsCancellable, org.bukkit.event.Cancellable, CanEditLicensePlate
On vehicle add rider (/vehicle addrider command). Riders are players who may steer the vehicle.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.entity.PlayergetAdded()Get the player who is being added as a riderorg.bukkit.entity.PlayergetAdder()Get the player who used /vehicle addrider commandGet license plate of the vehicle used in the eventvoidsetAdded(org.bukkit.entity.Player player) Set the player who is being added as a ridervoidsetCancelled(boolean cancelled) Sets the cancellation state of this event.voidsetLicensePlate(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, setPlayerMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronousMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bukkit.event.Cancellable
isCancelledMethods inherited from interface nl.mtvehicles.core.events.interfaces.HasVehicle
getVehicle
-
Constructor Details
-
VehicleAddRiderEvent
public VehicleAddRiderEvent()
-
-
Method Details
-
setCancelled
public void setCancelled(boolean cancelled) Description copied from interface:IsCancellableSets 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:
setCancelledin interfaceorg.bukkit.event.Cancellable- Specified by:
setCancelledin interfaceIsCancellable- Parameters:
cancelled- true if you wish to cancel this event
-
getLicensePlate
Description copied from interface:HasVehicleGet license plate of the vehicle used in the event- Specified by:
getLicensePlatein interfaceHasVehicle- Returns:
- Vehicle's license plate
-
setLicensePlate
Description copied from interface:CanEditLicensePlateSet the license plate of the vehicle used in the event- Specified by:
setLicensePlatein interfaceCanEditLicensePlate- Parameters:
licensePlate- New license plate
-
getAdder
public org.bukkit.entity.Player getAdder()Get the player who used /vehicle addrider command- See Also:
-
getAdded
public org.bukkit.entity.Player getAdded()Get the player who is being added as a rider -
setAdded
public void setAdded(org.bukkit.entity.Player player) Set the player who is being added as a rider
-