diff options
author | Celtic Minstrel <celtic.minstrel.ca@some.place> | 2012-03-12 12:45:09 -0400 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-03-15 07:18:59 -0400 |
commit | 92f771a022593c0b10349f2096b4d892e93f7807 (patch) | |
tree | f17cfa68edfd613269050c3edae0281cedf7f011 /src/main/java/net/minecraft/server | |
parent | 6f6f8ef0088c545505c75396a01fc7bd8055c249 (diff) | |
download | craftbukkit-92f771a022593c0b10349f2096b4d892e93f7807.tar craftbukkit-92f771a022593c0b10349f2096b4d892e93f7807.tar.gz craftbukkit-92f771a022593c0b10349f2096b4d892e93f7807.tar.lz craftbukkit-92f771a022593c0b10349f2096b4d892e93f7807.tar.xz craftbukkit-92f771a022593c0b10349f2096b4d892e93f7807.zip |
[Bleeding] Implemented ProjectileLaunchEvent. Addresses BUKKIT-284
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r-- | src/main/java/net/minecraft/server/World.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index 976dbe0c..8a35b54f 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -897,6 +897,11 @@ public class World implements IBlockAccess { if (event.isCancelled()) { return false; } + } else if (entity.getBukkitEntity() instanceof org.bukkit.entity.Projectile) { + // Not all projectiles extend EntityProjectile, so check for Bukkit interface instead + if (CraftEventFactory.callProjectileLaunchEvent(entity).isCancelled()) { + return false; + } } // CraftBukkit end |