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
ConstructorDescriptionTalismanActivateEvent
(Player player, Talisman talisman, ItemStack talismanItem) -
Method Summary
Modifier and TypeMethodDescriptionstatic HandlerList
boolean
boolean
Only applies ifTalisman.isConsumable()
is true.void
setCancelled
(boolean cancel) void
setPreventConsumption
(boolean preventConsumption) Only applies ifTalisman.isConsumable()
is true.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
TalismanActivateEvent
-
-
Method Details
-
getTalisman
- Returns:
- The
Talisman
used.
-
getTalismanItem
-
preventsConsumption
public boolean preventsConsumption()Only applies ifTalisman.isConsumable()
is true. Defaults to false.- Returns:
- Whether the
ItemStack
should not be consumed.
-
setPreventConsumption
public void setPreventConsumption(boolean preventConsumption) Only applies ifTalisman.isConsumable()
is true.- Parameters:
preventConsumption
- Whether theItemStack
should not be consumed.
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelled
in interfaceCancellable
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-