diff options
-rw-r--r-- | src/main/java/org/bukkit/event/block/EntityBlockFormEvent.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/event/block/EntityBlockFormEvent.java b/src/main/java/org/bukkit/event/block/EntityBlockFormEvent.java new file mode 100644 index 00000000..fb115a03 --- /dev/null +++ b/src/main/java/org/bukkit/event/block/EntityBlockFormEvent.java @@ -0,0 +1,32 @@ +package org.bukkit.event.block; + +import org.bukkit.block.Block; +import org.bukkit.block.BlockState; +import org.bukkit.entity.Entity; + +/** + * Called when a block is formed by entities. + *<p /> + * Examples: + *<ul> + * <li>Snow formed by a {@link org.bukkit.entity.Snowman}.</li> + * </ul> + */ +public class EntityBlockFormEvent extends BlockFormEvent { + private Entity entity; + + public EntityBlockFormEvent(Entity entity, Block block, BlockState blockstate) { + super(block, blockstate); + + this.entity = entity; + } + + /** + * Get the entity that formed the block. + * + * @return Entity involved in event + */ + public Entity getEntity() { + return entity; + } +}
\ No newline at end of file |