Package org.bukkit.event.block
Class TNTPrimeEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
org.bukkit.event.block.TNTPrimeEvent
- All Implemented Interfaces:
- Cancellable
Called when a block of TNT in the world become primed.
 
If a TNT Prime event is cancelled, the block of TNT will not become primed.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumAn enum to represent the cause of a TNT block becoming primed.Nested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.block.BlockEventblock
- 
Constructor SummaryConstructorsConstructorDescriptionTNTPrimeEvent(@NotNull Block block, @NotNull TNTPrimeEvent.PrimeCause igniteCause, @Nullable Entity primingEntity, @Nullable Block primingBlock) 
- 
Method SummaryModifier and TypeMethodDescriptiongetCause()Get the cause of the TNT becoming primed.static @NotNull HandlerListGet the block that caused the TNT to be primed.Get the entity that caused the TNT to be primed.booleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.Methods inherited from class org.bukkit.event.block.BlockEventgetBlockMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
TNTPrimeEvent
 
- 
- 
Method Details- 
isCancelledpublic boolean isCancelled()Description copied from interface:CancellableGets 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:
- isCancelledin interface- Cancellable
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic void setCancelled(boolean cancel) Description copied from interface:CancellableSets 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 interface- Cancellable
- Parameters:
- cancel- true if you wish to cancel this event
 
- 
getCauseGet the cause of the TNT becoming primed.- Returns:
- the cause
 
- 
getPrimingEntityGet the entity that caused the TNT to be primed.- Returns:
- the entity that caused the TNT to be primed, or null if it was not caused by an entity.
 
- 
getPrimingBlockGet the block that caused the TNT to be primed.- Returns:
- the block that caused the TNT to be primed, or null if it was not caused by a block.
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-