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
-
Constructor Summary
Constructors Constructor Description ItemExpireTimeClearEvent(org.bukkit.inventory.ItemStack item, long expireTime) -
Method Summary
Modifier and Type Method Description longgetExpireTime()Get the current expire time of itembooleanisCancelled()Gets the cancellation state of this event.voidsetCancelled(boolean isCancelled)Sets the cancellation state of this event.
-
Constructor Details
-
ItemExpireTimeClearEvent
public ItemExpireTimeClearEvent(org.bukkit.inventory.ItemStack item, long expireTime)
-
-
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
-