Class TalismanActivateEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
io.github.thebusybiscuit.slimefun4.api.events.TalismanActivateEvent
- All Implemented Interfaces:
Cancellable
- Author:
- cworldstar
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionTalismanActivateEvent(Player player, Talisman talisman, ItemStack talismanItem) -
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerListbooleanbooleanOnly applies ifTalisman.isConsumable()is true.voidsetCancelled(boolean cancel) voidsetPreventConsumption(boolean preventConsumption) Only applies ifTalisman.isConsumable()is true.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
TalismanActivateEvent
-
-
Method Details
-
getTalisman
- Returns:
- The
Talismanused.
-
getTalismanItem
-
preventsConsumption
public boolean preventsConsumption()Only applies ifTalisman.isConsumable()is true. Defaults to false.- Returns:
- Whether the
ItemStackshould not be consumed.
-
setPreventConsumption
public void setPreventConsumption(boolean preventConsumption) Only applies ifTalisman.isConsumable()is true.- Parameters:
preventConsumption- Whether theItemStackshould not be consumed.
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelledin interfaceCancellable
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-