Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.event.entity.EntityChangeBlockEvent Class Reference
Inheritance diagram for org.bukkit.event.entity.EntityChangeBlockEvent:
org.bukkit.event.entity.EntityEvent org.bukkit.event.Cancellable org.bukkit.event.Event org.bukkit.event.entity.EntityBreakDoorEvent

Public Member Functions

 EntityChangeBlockEvent (final LivingEntity what, final Block block, final Material to)
 
 EntityChangeBlockEvent (final Entity what, final Block block, final Material to, final byte data)
 
Block getBlock ()
 
boolean isCancelled ()
 
void setCancelled (boolean cancel)
 
Material getTo ()
 
byte getData ()
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.entity.EntityEvent
 EntityEvent (final Entity what)
 
Entity getEntity ()
 
EntityType getEntityType ()
 
- 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.entity.EntityEvent
Entity entity
 

Detailed Description

Called when any Entity, excluding players, changes a block.

Definition at line 13 of file EntityChangeBlockEvent.java.

Constructor & Destructor Documentation

org.bukkit.event.entity.EntityChangeBlockEvent.EntityChangeBlockEvent ( final LivingEntity  what,
final Block  block,
final Material  to 
)
Parameters
whatthe LivingEntity causing the change
blockthe block (before the change)
tothe future material being changed to
Deprecated:
Provided as a backward compatibility before the data byte was provided, and type increased to all entities

Definition at line 29 of file EntityChangeBlockEvent.java.

29  {
30  this (what, block, to, (byte) 0);
31  }
org.bukkit.event.entity.EntityChangeBlockEvent.EntityChangeBlockEvent ( final Entity  what,
final Block  block,
final Material  to,
final byte  data 
)
Parameters
whatthe Entity causing the change
blockthe block (before the change)
tothe future material being changed to
datathe future block data
Deprecated:
Magic value

Definition at line 42 of file EntityChangeBlockEvent.java.

42  {
43  super(what);
44  this.block = block;
45  this.cancel = false;
46  this.to = to;
47  this.data = data;
48  }

Member Function Documentation

Block org.bukkit.event.entity.EntityChangeBlockEvent.getBlock ( )

Gets the block the entity is changing

Returns
the block that is changing

Definition at line 55 of file EntityChangeBlockEvent.java.

55  {
56  return block;
57  }
byte org.bukkit.event.entity.EntityChangeBlockEvent.getData ( )

Gets the data for the block that would be changed into

Returns
the data for the block that would be changed into
Deprecated:
Magic value

Definition at line 83 of file EntityChangeBlockEvent.java.

83  {
84  return data;
85  }
Material org.bukkit.event.entity.EntityChangeBlockEvent.getTo ( )

Gets the Material that the block is changing into

Returns
the material that the block is changing into

Definition at line 72 of file EntityChangeBlockEvent.java.

72  {
73  return to;
74  }
boolean org.bukkit.event.entity.EntityChangeBlockEvent.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 59 of file EntityChangeBlockEvent.java.

59  {
60  return cancel;
61  }
void org.bukkit.event.entity.EntityChangeBlockEvent.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 63 of file EntityChangeBlockEvent.java.

63  {
64  this.cancel = cancel;
65  }

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