From 92f771a022593c0b10349f2096b4d892e93f7807 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Mon, 12 Mar 2012 12:45:09 -0400 Subject: [Bleeding] Implemented ProjectileLaunchEvent. Addresses BUKKIT-284 --- src/main/java/net/minecraft/server/World.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/net') 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 -- cgit v1.2.3