summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorfeildmaster <admin@feildmaster.com>2012-04-28 12:26:07 -0500
committerfeildmaster <admin@feildmaster.com>2012-06-23 06:42:08 -0500
commit568fae2e863a41f168f10c77090d16fe67e293bb (patch)
tree70a0d08b93974edc521ee96c91ca9c37cc44d86f /src/main/java/org
parent23d5922bbf581ce77d05710f1ef83c67ee5dbda7 (diff)
downloadcraftbukkit-568fae2e863a41f168f10c77090d16fe67e293bb.tar
craftbukkit-568fae2e863a41f168f10c77090d16fe67e293bb.tar.gz
craftbukkit-568fae2e863a41f168f10c77090d16fe67e293bb.tar.lz
craftbukkit-568fae2e863a41f168f10c77090d16fe67e293bb.tar.xz
craftbukkit-568fae2e863a41f168f10c77090d16fe67e293bb.zip
Trigger EntityBlockChangeEvent for Silverfish. Adds BUKKIT-1560 and BUKKIT-1593
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index ffd5b442..6134d118 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -441,6 +441,13 @@ public class CraftEventFactory {
return event;
}
+ public static EntityChangeBlockEvent callEntityChangeBlockEvent(Entity entity, int x, int y, int z, int type) {
+ Block block = entity.world.getWorld().getBlockAt(x, y, z);
+ Material material = Material.getMaterial(type);
+
+ return callEntityChangeBlockEvent(entity, block, material);
+ }
+
public static CreeperPowerEvent callCreeperPowerEvent(Entity creeper, Entity lightning, CreeperPowerEvent.PowerCause cause) {
CreeperPowerEvent event = new CreeperPowerEvent((Creeper) creeper.getBukkitEntity(), (LightningStrike) lightning.getBukkitEntity(), cause);
creeper.getBukkitEntity().getServer().getPluginManager().callEvent(event);