mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 02:07:37 +01:00
Added ItemDespawnEvent
By: Feildmaster <admin@feildmaster.com>
This commit is contained in:
parent
f2606b7cbe
commit
30bb54a655
@ -141,7 +141,6 @@ public class CraftEventFactory {
|
||||
/**
|
||||
* Player Interact event
|
||||
*/
|
||||
|
||||
public static PlayerInteractEvent callPlayerInteractEvent(EntityHuman who, Action action, ItemStack itemstack) {
|
||||
if (action != Action.LEFT_CLICK_AIR && action != Action.RIGHT_CLICK_AIR) {
|
||||
throw new IllegalArgumentException();
|
||||
@ -286,6 +285,18 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
/**
|
||||
* ItemDespawnEvent
|
||||
*/
|
||||
public static ItemDespawnEvent callItemDespawnEvent(EntityItem entityitem) {
|
||||
org.bukkit.entity.Entity entity = entityitem.getBukkitEntity();
|
||||
|
||||
ItemDespawnEvent event = new ItemDespawnEvent(entity, entity.getLocation());
|
||||
|
||||
((CraftServer) entity.getServer()).getPluginManager().callEvent(event);
|
||||
return event;
|
||||
}
|
||||
|
||||
/**
|
||||
* BlockFadeEvent
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user