@@ -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
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user