From 9f37f705272d633c8cf316b3522833ad6441c1d9 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sun, 6 May 2012 21:38:01 -0600 Subject: Fire PlayerItemBreakEvent. Addresses BUKKIT-1600 --- src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main/java/org') diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index 79ad5256..ffd5b442 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -526,4 +526,10 @@ public class CraftEventFactory { world.getServer().getPluginManager().callEvent(event); return event; } + + public static void callPlayerItemBreakEvent(EntityHuman human, ItemStack brokenItem) { + CraftItemStack item = new CraftItemStack(brokenItem); + PlayerItemBreakEvent event = new PlayerItemBreakEvent((Player) human.getBukkitEntity(), item); + Bukkit.getPluginManager().callEvent(event); + } } -- cgit v1.2.3