Fire PlayerItemBreakEvent. Addresses BUKKIT-1600

This commit is contained in:
Travis Ralston
2012-05-06 21:38:01 -06:00
committed by Travis Watkins
parent 8bc42ba8c9
commit 9f37f70527
2 changed files with 12 additions and 0 deletions

View File

@@ -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);
}
}