Class TNTPrimeEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
com.destroystokyo.paper.event.block.TNTPrimeEvent
- All Implemented Interfaces:
Cancellable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Field Summary
Fields inherited from class org.bukkit.event.block.BlockEvent
block -
Constructor Summary
ConstructorsConstructorDescriptionTNTPrimeEvent(@NotNull Block theBlock, @NotNull TNTPrimeEvent.PrimeReason reason, @Nullable Entity primerEntity) -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable HandlerListGets the TNT primerEntity.Gets the TNT prime reasonbooleanGets whether spawningTNTPrimedshould be cancelled or notvoidsetCancelled(boolean cancel) Sets whether to cancel spawningTNTPrimedor notMethods inherited from class org.bukkit.event.block.BlockEvent
getBlockMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
TNTPrimeEvent
-
-
Method Details
-
getReason
Gets the TNT prime reason- Returns:
- Prime reason
-
getPrimerEntity
Gets the TNT primerEntity. It's null ifgetReason()isTNTPrimeEvent.PrimeReason.REDSTONEorTNTPrimeEvent.PrimeReason.FIRE. It's not null ifgetReason()isTNTPrimeEvent.PrimeReason.ITEMorTNTPrimeEvent.PrimeReason.PROJECTILEIt might be null ifgetReason()isTNTPrimeEvent.PrimeReason.EXPLOSION- Returns:
- The
Entitywho primed the TNT
-
isCancelled
public boolean isCancelled()Gets whether spawningTNTPrimedshould be cancelled or not- Specified by:
isCancelledin interfaceCancellable- Returns:
- Whether spawning
TNTPrimedshould be cancelled or not
-
setCancelled
public void setCancelled(boolean cancel) Sets whether to cancel spawningTNTPrimedor not- Specified by:
setCancelledin interfaceCancellable- Parameters:
cancel- whether spawningTNTPrimedshould be cancelled or not
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-