Package org.bukkit.event.block
Class BlockFromToEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
org.bukkit.event.block.BlockFromToEvent
- All Implemented Interfaces:
- Cancellable
Represents events with a source block and a destination block, currently
 only applies to liquid (lava and water) and teleporting dragon eggs.
 
If a Block From To event is cancelled, the block will not move (the liquid will not flow).
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFieldsFields inherited from class org.bukkit.event.block.BlockEventblock
- 
Constructor SummaryConstructorsConstructorDescriptionBlockFromToEvent(Block block, Block toBlock) BlockFromToEvent(Block block, BlockFace face) 
- 
Method SummaryModifier and TypeMethodDescriptiongetFace()Gets the BlockFace that the block is moving to.static HandlerListConvenience method for getting the faced Block.booleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.Methods inherited from class org.bukkit.event.block.BlockEventgetBlockMethods inherited from class org.bukkit.event.EventgetEventName, isAsynchronous
- 
Field Details- 
to
- 
face
- 
cancelprotected boolean cancel
 
- 
- 
Constructor Details- 
BlockFromToEvent
- 
BlockFromToEvent
 
- 
- 
Method Details- 
getFaceGets the BlockFace that the block is moving to.- Returns:
- The BlockFace that the block is moving to
 
- 
getToBlockConvenience method for getting the faced Block.- Returns:
- The faced Block
 
- 
isCancelledpublic boolean isCancelled()Description copied from interface:CancellableGets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
- isCancelledin interface- Cancellable
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic void setCancelled(boolean cancel) Description copied from interface:CancellableSets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancel- true if you wish to cancel this event
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-