Class PreWorldItemExpireEvent

java.lang.Object

public class PreWorldItemExpireEvent
extends PreItemExpireEvent
Event will be called before item on ground is expired.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors 
    Constructor Description
    PreWorldItemExpireEvent​(org.bukkit.inventory.ItemStack item, long expireTime, org.bukkit.Location location)  
  • Method Summary

    Modifier and Type Method Description
    org.bukkit.Location getLocation()
    Get location of item
    void teleport​(org.bukkit.Location location)
    Teleport item to specific location

    Methods inherited from class dev.tezvn.timeditem.api.event.item.PreItemExpireEvent

    addTime, getExpireTime

    Methods inherited from class dev.tezvn.timeditem.api.event.item.ItemEvent

    getItem, setItem

    Methods inherited from class dev.tezvn.timeditem.api.event.TimedEvent

    getHandlerList, getHandlers

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PreWorldItemExpireEvent

      public PreWorldItemExpireEvent​(org.bukkit.inventory.ItemStack item, long expireTime, org.bukkit.Location location)
  • Method Details

    • getLocation

      public org.bukkit.Location getLocation()
      Get location of item
      Returns:
      Location where item will be disappeared
    • teleport

      public void teleport​(org.bukkit.Location location)
      Teleport item to specific location

      Item can be teleported if the new expire time is greater than the old expire time

      Parameters:
      location - Destination of item