public class TNTPrimeEvent extends BlockEvent implements Cancellable
TNTPrimed
Cancelling it won't turn TNT into TNTPrimed and leaves
the TNT block as-is
| Modifier and Type | Class and Description |
|---|---|
static class |
TNTPrimeEvent.PrimeReason |
Event.Resultblock| Constructor and Description |
|---|
TNTPrimeEvent(@NotNull Block theBlock,
@NotNull TNTPrimeEvent.PrimeReason reason,
@Nullable Entity primerEntity) |
| Modifier and Type | Method and Description |
|---|---|
static @Nullable HandlerList |
getHandlerList() |
@Nullable HandlerList |
getHandlers() |
@Nullable Entity |
getPrimerEntity()
Gets the TNT primer
Entity. |
@NotNull TNTPrimeEvent.PrimeReason |
getReason()
Gets the TNT prime reason
|
boolean |
isCancelled()
Gets whether spawning
TNTPrimed should be cancelled or not |
void |
setCancelled(boolean cancel)
Sets whether to cancel spawning
TNTPrimed or not |
getBlockcallEvent, getEventName, isAsynchronous@NotNull public @NotNull TNTPrimeEvent.PrimeReason getReason()
@Nullable public @Nullable Entity getPrimerEntity()
Entity.
It's null if getReason() is TNTPrimeEvent.PrimeReason.REDSTONE or TNTPrimeEvent.PrimeReason.FIRE.
It's not null if getReason() is TNTPrimeEvent.PrimeReason.ITEM or TNTPrimeEvent.PrimeReason.PROJECTILE
It might be null if getReason() is TNTPrimeEvent.PrimeReason.EXPLOSIONEntity who primed the TNTpublic boolean isCancelled()
TNTPrimed should be cancelled or notisCancelled in interface CancellableTNTPrimed should be cancelled or notpublic void setCancelled(boolean cancel)
TNTPrimed or notsetCancelled in interface Cancellablecancel - whether spawning TNTPrimed should be cancelled or not@Nullable public @Nullable HandlerList getHandlers()
getHandlers in class Event@Nullable public static @Nullable HandlerList getHandlerList()
Copyright © 2021. All rights reserved.