Fire PlayerItemBreakEvent. Addresses BUKKIT-1600

By: Travis Ralston <travpc@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2012-05-06 21:38:01 -06:00
parent 474a9e54a8
commit 3211d52685

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