Class MTVListener
java.lang.Object
nl.mtvehicles.core.infrastructure.models.MTVListener
- All Implemented Interfaces:
org.bukkit.event.Listener
- Direct Known Subclasses:
ChatListener
,InventoryClickListener
,InventoryCloseListener
,JerryCanClickListener
,JoinListener
,VehicleClickListener
,VehicleEntityListener
,VehicleLeaveListener
,VehiclePlaceListener
,VehicleVoucherListener
Abstract class for the plugin's listeners
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
event
protected org.bukkit.event.Event eventThe event the listener is listening to -
player
@Nullable protected org.bukkit.entity.Player playerPlayer of this event
-
-
Constructor Details
-
MTVListener
protected MTVListener() -
MTVListener
-
-
Method Details
-
isCancelled
protected boolean isCancelled()Check whether the event has been cancelled via MTVehicles API.- Returns:
- True if event is cancelled
-
setAPI
-
getAPI
-
callAPI
protected void callAPI() -
callAPI
Call the event with a custom player- Parameters:
player
- Custom player (may be null if no player is specified)- Throws:
NullPointerException
- If API is not specified for the listener (seesetAPI(MTVEvent)
)
-