001 package org.bukkit.event.block;
002
003 import org.bukkit.block.Block;
004 import org.bukkit.block.BlockState;
005 import org.bukkit.entity.Entity;
006
007 /**
008 * Called when a block is formed by entities.
009 * <p>
010 * Examples:
011 * <ul>
012 * <li>Snow formed by a {@link org.bukkit.entity.Snowman}.
013 * </ul>
014 */
015 public class EntityBlockFormEvent extends BlockFormEvent {
016 private final Entity entity;
017
018 public EntityBlockFormEvent(final Entity entity, final Block block, final BlockState blockstate) {
019 super(block, blockstate);
020
021 this.entity = entity;
022 }
023
024 /**
025 * Get the entity that formed the block.
026 *
027 * @return Entity involved in event
028 */
029 public Entity getEntity() {
030 return entity;
031 }
032 }