diff options
author | feildmaster <admin@feildmaster.com> | 2012-04-28 12:26:07 -0500 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2012-06-23 06:42:08 -0500 |
commit | 568fae2e863a41f168f10c77090d16fe67e293bb (patch) | |
tree | 70a0d08b93974edc521ee96c91ca9c37cc44d86f /src/main/java/org | |
parent | 23d5922bbf581ce77d05710f1ef83c67ee5dbda7 (diff) | |
download | craftbukkit-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.java | 7 |
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); |