Cancellable
public class BlockPhysicsEvent extends BlockEvent implements Cancellable
Event.Result
block
Constructor | Description |
---|---|
BlockPhysicsEvent(@NotNull Block block,
@NotNull BlockData changed) |
|
BlockPhysicsEvent(@NotNull Block block,
@NotNull BlockData changed,
@NotNull Block sourceBlock) |
Modifier and Type | Method | Description |
---|---|---|
@NotNull Material |
getChangedType() |
Gets the type of block that changed, causing this event
|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull HandlerList |
getHandlers() |
|
@NotNull Block |
getSourceBlock() |
Gets the source block that triggered this event.
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel) |
Sets the cancellation state of this event.
|
getBlock
getEventName, isAsynchronous
public BlockPhysicsEvent(@NotNull @NotNull Block block, @NotNull @NotNull BlockData changed)
@NotNull public @NotNull Block getSourceBlock()
@NotNull public @NotNull Material getChangedType()
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 HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2020. All rights reserved.