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

Public Member Functions

 BlockGrowEvent (final Block block, final BlockState newState)
 
BlockState getNewState ()
 
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 ()
 

Additional Inherited Members

- Protected Attributes inherited from org.bukkit.event.block.BlockEvent
Block block
 

Detailed Description

Called when a block grows naturally in the world.

Examples:

  • Wheat
  • Sugar Cane
  • Cactus
  • Watermelon
  • Pumpkin

If a Block Grow event is cancelled, the block will not grow.

Definition at line 22 of file BlockGrowEvent.java.

Member Function Documentation

BlockState org.bukkit.event.block.BlockGrowEvent.getNewState ( )

Gets the state of the block where it will form or spread to.

Returns
The block state for this events block

Definition at line 37 of file BlockGrowEvent.java.

37  {
38  return newState;
39  }
boolean org.bukkit.event.block.BlockGrowEvent.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 41 of file BlockGrowEvent.java.

41  {
42  return cancelled;
43  }
void org.bukkit.event.block.BlockGrowEvent.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 45 of file BlockGrowEvent.java.

45  {
46  this.cancelled = cancel;
47  }

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