Added EntityBlockFormEvent for block forming by entity actions (snowmen etc). Thanks to fieldmaster for the PR.
This commit is contained in:
parent
9e3ce5cd24
commit
11adb74a23
@ -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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user