Class ItemExpireTimeClearEvent

java.lang.Object
org.bukkit.event.Event
dev.tezvn.timeditem.api.event.TimedEvent
dev.tezvn.timeditem.api.event.item.ItemEvent
dev.tezvn.timeditem.api.event.item.ItemExpireTimeClearEvent

public class ItemExpireTimeClearEvent
extends ItemEvent
Event will be fired before player clear expire time from item.
  • Nested Class Summary

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

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

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

    Modifier and Type Method Description
    long getExpireTime()
    Get the current expire time of item
    boolean isCancelled()
    Gets the cancellation state of this event.
    void setCancelled​(boolean isCancelled)
    Sets the cancellation state of this event.

    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

  • Method Details

    • getExpireTime

      public long getExpireTime()
      Get the current expire time of item
      Returns:
      Expire time of item
    • isCancelled

      public boolean isCancelled()
      Gets the cancellation state of this event.

      Set to true if you want to prevent player from clearing expire time

      Returns:
      True if this event is cancelled
    • setCancelled

      public void setCancelled​(boolean isCancelled)
      Sets the cancellation state of this event.

      Cancelling this event will prevent clearing of expire time

      Parameters:
      isCancelled - True if you wish to cancel this event