mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 10:17:38 +01:00
Fire PlayerItemBreakEvent. Addresses BUKKIT-1600
By: Travis Ralston <travpc@gmail.com>
This commit is contained in:
parent
474a9e54a8
commit
3211d52685
@ -526,4 +526,10 @@ public class CraftEventFactory {
|
|||||||
world.getServer().getPluginManager().callEvent(event);
|
world.getServer().getPluginManager().callEvent(event);
|
||||||
return 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 New Issue
Block a user