Cancellable
public class BlockIgniteEvent extends BlockEvent implements Cancellable
BlockPlaceEvent
.
If a Block Ignite event is cancelled, the block will not be ignited.
Modifier and Type | Class | Description |
---|---|---|
static class |
BlockIgniteEvent.IgniteCause |
An enum to specify the cause of the ignite
|
Event.Result
block
Constructor | Description |
---|---|
BlockIgniteEvent(@NotNull Block theBlock,
@NotNull BlockIgniteEvent.IgniteCause cause,
@NotNull Block ignitingBlock) |
|
BlockIgniteEvent(@NotNull Block theBlock,
@NotNull BlockIgniteEvent.IgniteCause cause,
@NotNull Entity ignitingEntity) |
|
BlockIgniteEvent(@NotNull Block theBlock,
@NotNull BlockIgniteEvent.IgniteCause cause,
@Nullable Entity ignitingEntity,
@Nullable Block ignitingBlock) |
Modifier and Type | Method | Description |
---|---|---|
@NotNull BlockIgniteEvent.IgniteCause |
getCause() |
Gets the cause of block ignite.
|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull HandlerList |
getHandlers() |
|
@Nullable Block |
getIgnitingBlock() |
Gets the block which ignited this block
|
@Nullable Entity |
getIgnitingEntity() |
Gets the entity who ignited this block
|
@Nullable Player |
getPlayer() |
Gets the player who ignited this block
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel) |
Sets the cancellation state of this event.
|
getBlock
callEvent, getEventName, isAsynchronous
public BlockIgniteEvent(@NotNull @NotNull Block theBlock, @NotNull @NotNull BlockIgniteEvent.IgniteCause cause, @NotNull @NotNull Entity ignitingEntity)
public BlockIgniteEvent(@NotNull @NotNull Block theBlock, @NotNull @NotNull BlockIgniteEvent.IgniteCause cause, @NotNull @NotNull Block ignitingBlock)
public BlockIgniteEvent(@NotNull @NotNull Block theBlock, @NotNull @NotNull BlockIgniteEvent.IgniteCause cause, @Nullable @Nullable Entity ignitingEntity, @Nullable @Nullable Block ignitingBlock)
public boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this event@NotNull public @NotNull BlockIgniteEvent.IgniteCause getCause()
@Nullable public @Nullable Player getPlayer()
@Nullable public @Nullable Entity getIgnitingEntity()
@Nullable public @Nullable Block getIgnitingBlock()
@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2020. All rights reserved.