mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 03:43:40 +01:00
Fire PlayerItemBreakEvent. Addresses BUKKIT-1600
By: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
474a9e54a8
commit
3211d52685
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue