From 9c7ffb6d3c3ce37dc96e679cb2a30a5ed76f1257 Mon Sep 17 00:00:00 2001 From: feildmaster Date: Fri, 23 Mar 2012 09:49:34 -0500 Subject: [Bleeding] Fixed blocks dropping when BlockBreakEvent is canceled. Fixes BUKKIT-1299 --- src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/java/org/bukkit') diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index f4b2cb94..39f01117 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -539,6 +539,7 @@ public class CraftEventFactory { world.getServer().getPluginManager().callEvent(event); if (event.isCancelled()) { + blockType.setDrops(new ArrayList()); // Let the client know the block still exists ((EntityPlayer) player).netServerHandler.sendPacket(new Packet53BlockChange(x, y, z, world)); return true; -- cgit v1.2.3