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 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
ConstructorDescriptionTNTPrimeEvent(@NotNull Block theBlock, @NotNull TNTPrimeEvent.PrimeReason reason, @Nullable Entity primerEntity)
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable HandlerList
Gets the TNT primerEntity
.Gets the TNT prime reasonboolean
Gets whether spawningTNTPrimed
should be cancelled or notvoid
setCancelled(boolean cancel)
Sets whether to cancel spawningTNTPrimed
or notMethods inherited from class org.bukkit.event.block.BlockEvent
getBlock
Methods 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.REDSTONE
orTNTPrimeEvent.PrimeReason.FIRE
. It's not null ifgetReason()
isTNTPrimeEvent.PrimeReason.ITEM
orTNTPrimeEvent.PrimeReason.PROJECTILE
It might be null ifgetReason()
isTNTPrimeEvent.PrimeReason.EXPLOSION
- Returns:
- The
Entity
who primed the TNT
-
isCancelled
public boolean isCancelled()Gets whether spawningTNTPrimed
should be cancelled or not- Specified by:
isCancelled
in interfaceCancellable
- Returns:
- Whether spawning
TNTPrimed
should be cancelled or not
-
setCancelled
public void setCancelled(boolean cancel)Sets whether to cancel spawningTNTPrimed
or not- Specified by:
setCancelled
in interfaceCancellable
- Parameters:
cancel
- whether spawningTNTPrimed
should be cancelled or not
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-