Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.event.block.BlockFromToEvent Class Reference
Inheritance diagram for org.bukkit.event.block.BlockFromToEvent:
org.bukkit.event.block.BlockEvent org.bukkit.event.Cancellable org.bukkit.event.Event

Public Member Functions

 BlockFromToEvent (final Block block, final BlockFace face)
 
 BlockFromToEvent (final Block block, final Block toBlock)
 
BlockFace getFace ()
 
Block getToBlock ()
 
boolean isCancelled ()
 
void setCancelled (boolean cancel)
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.block.BlockEvent
 BlockEvent (final Block theBlock)
 
final Block getBlock ()
 
- Public Member Functions inherited from org.bukkit.event.Event
 Event ()
 
 Event (boolean isAsync)
 
String getEventName ()
 
abstract HandlerList getHandlers ()
 
final boolean isAsynchronous ()
 

Static Public Member Functions

static HandlerList getHandlerList ()
 

Protected Attributes

Block to
 
BlockFace face
 
boolean cancel
 
- Protected Attributes inherited from org.bukkit.event.block.BlockEvent
Block block
 

Detailed Description

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).

Definition at line 15 of file BlockFromToEvent.java.

Member Function Documentation

BlockFace org.bukkit.event.block.BlockFromToEvent.getFace ( )

Gets the BlockFace that the block is moving to.

Returns
The BlockFace that the block is moving to

Definition at line 39 of file BlockFromToEvent.java.

39  {
40  return face;
41  }
Block org.bukkit.event.block.BlockFromToEvent.getToBlock ( )

Convenience method for getting the faced Block.

Returns
The faced Block

Definition at line 48 of file BlockFromToEvent.java.

References org.bukkit.block.Block.getRelative().

48  {
49  if (to == null) {
50  to = block.getRelative(face);
51  }
52  return to;
53  }
Block getRelative(int modX, int modY, int modZ)
boolean org.bukkit.event.block.BlockFromToEvent.isCancelled ( )

Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins

Returns
true if this event is cancelled

Implements org.bukkit.event.Cancellable.

Definition at line 55 of file BlockFromToEvent.java.

55  {
56  return cancel;
57  }
void org.bukkit.event.block.BlockFromToEvent.setCancelled ( boolean  cancel)

Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Parameters
canceltrue if you wish to cancel this event

Implements org.bukkit.event.Cancellable.

Definition at line 59 of file BlockFromToEvent.java.

59  {
60  this.cancel = cancel;
61  }

The documentation for this class was generated from the following file: