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

public class TalismanActivateEvent extends PlayerEvent implements Cancellable
This PlayerEvent is called when a Player activates a Talisman
Author:
cworldstar
  • Constructor Details

    • TalismanActivateEvent

      @ParametersAreNonnullByDefault public TalismanActivateEvent(Player player, Talisman talisman, ItemStack talismanItem)
      Parameters:
      player - The Player who activated the talisman.
      talisman - The Talisman that was activated.
      talismanItem - The ItemStack corresponding to the Talisman.
  • Method Details

    • getTalisman

      @Nonnull public Talisman getTalisman()
      Returns:
      The Talisman used.
    • getTalismanItem

      @Nonnull public ItemStack getTalismanItem()
      Returns:
      The ItemStack of the used Talisman.
    • preventsConsumption

      public boolean preventsConsumption()
      Only applies if Talisman.isConsumable() is true. Defaults to false.
      Returns:
      Whether the ItemStack should not be consumed.
    • setPreventConsumption

      public void setPreventConsumption(boolean preventConsumption)
      Only applies if Talisman.isConsumable() is true.
      Parameters:
      preventConsumption - Whether the ItemStack should not be consumed.
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface Cancellable
    • setCancelled

      public void setCancelled(boolean cancel)
      Specified by:
      setCancelled in interface Cancellable
    • getHandlers

      @Nonnull public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      @Nonnull public static HandlerList getHandlerList()