mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 10:17:38 +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
|
* Player Interact event
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static PlayerInteractEvent callPlayerInteractEvent(EntityHuman who, Action action, ItemStack itemstack) {
|
public static PlayerInteractEvent callPlayerInteractEvent(EntityHuman who, Action action, ItemStack itemstack) {
|
||||||
if (action != Action.LEFT_CLICK_AIR && action != Action.RIGHT_CLICK_AIR) {
|
if (action != Action.LEFT_CLICK_AIR && action != Action.RIGHT_CLICK_AIR) {
|
||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
@ -286,6 +285,18 @@ public class CraftEventFactory {
|
|||||||
return event;
|
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
|
* BlockFadeEvent
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user