summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorNathan Adams <dinnerbone@dinnerbone.com>2012-01-15 09:13:00 +0000
committerNathan Adams <dinnerbone@dinnerbone.com>2012-01-15 09:13:00 +0000
commit11adb74a23847d2922ca088c8d7bdf67324f3fb9 (patch)
treea571a1c0881f1c5009589266cbb28c7722179c78 /src/main/java
parent9e3ce5cd24d8414e58c9a0d701582e0a241c64ef (diff)
downloadbukkit-11adb74a23847d2922ca088c8d7bdf67324f3fb9.tar
bukkit-11adb74a23847d2922ca088c8d7bdf67324f3fb9.tar.gz
bukkit-11adb74a23847d2922ca088c8d7bdf67324f3fb9.tar.lz
bukkit-11adb74a23847d2922ca088c8d7bdf67324f3fb9.tar.xz
bukkit-11adb74a23847d2922ca088c8d7bdf67324f3fb9.zip
Added EntityBlockFormEvent for block forming by entity actions (snowmen etc). Thanks to fieldmaster for the PR.
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/bukkit/event/block/EntityBlockFormEvent.java32
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