Cancellablepublic 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 | Description |
|---|---|---|
static class |
TNTPrimeEvent.PrimeReason |
Event.Resultblock| Constructor | Description |
|---|---|
TNTPrimeEvent(Block theBlock,
TNTPrimeEvent.PrimeReason reason,
Entity primerEntity) |
| Modifier and Type | Method | Description |
|---|---|---|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
Entity |
getPrimerEntity() |
Gets the TNT primer
Entity. |
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 TNTPrimeEvent.PrimeReason getReason()
@Nullable public 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 HandlerList getHandlers()
getHandlers in class Event@Nullable public static HandlerList getHandlerList()
Copyright © 2020. All rights reserved.