Cancellablepublic class BlockFromToEvent extends BlockEvent implements Cancellable
If a Block From To event is cancelled, the block will not move (the liquid will not flow).
Event.Result| Modifier and Type | Field | Description | 
|---|---|---|
| protected boolean | cancel | |
| protected BlockFace | face | |
| protected Block | to | 
block| Constructor | Description | 
|---|---|
| BlockFromToEvent(@NotNull Block block,
                @NotNull Block toBlock) | |
| BlockFromToEvent(@NotNull Block block,
                @NotNull BlockFace face) | 
| Modifier and Type | Method | Description | 
|---|---|---|
| @NotNull BlockFace | getFace() | Gets the BlockFace that the block is moving to. | 
| static @NotNull HandlerList | getHandlerList() | |
| @NotNull HandlerList | getHandlers() | |
| @NotNull Block | getToBlock() | Convenience method for getting the faced Block. | 
| boolean | isCancelled() | Gets the cancellation state of this event. | 
| void | setCancelled(boolean cancel) | Sets the cancellation state of this event. | 
getBlockgetEventName, isAsynchronouspublic BlockFromToEvent(@NotNull
                        @NotNull Block block,
                        @NotNull
                        @NotNull BlockFace face)
@NotNull public @NotNull BlockFace getFace()
@NotNull public @NotNull Block getToBlock()
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - 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.