diff options
author | Travis Ralston <travpc@gmail.com> | 2012-05-06 21:38:01 -0600 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-06-21 01:10:30 -0500 |
commit | 9f37f705272d633c8cf316b3522833ad6441c1d9 (patch) | |
tree | 09b5af5b782f4dcc7559ecbb7f3f4a9ddd818c83 /src/main/java/org | |
parent | 8bc42ba8c94ea7ceae81d0620434162333fde404 (diff) | |
download | craftbukkit-9f37f705272d633c8cf316b3522833ad6441c1d9.tar craftbukkit-9f37f705272d633c8cf316b3522833ad6441c1d9.tar.gz craftbukkit-9f37f705272d633c8cf316b3522833ad6441c1d9.tar.lz craftbukkit-9f37f705272d633c8cf316b3522833ad6441c1d9.tar.xz craftbukkit-9f37f705272d633c8cf316b3522833ad6441c1d9.zip |
Fire PlayerItemBreakEvent. Addresses BUKKIT-1600
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java | 6 |
1 files changed, 6 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 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); + } } |