summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit/event/block/EntityBlockFormEvent.java
blob: fb115a031507b3b831cbea8f05dfc414009b2021 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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;
    }
}