Class XPrisonPlayerEnchantTriggerEvent

java.lang.Object
org.bukkit.event.Event
All Implemented Interfaces:
org.bukkit.event.Cancellable
Direct Known Subclasses:
ExplosionTriggerEvent, LayerTriggerEvent, NukeTriggerEvent

public abstract class XPrisonPlayerEnchantTriggerEvent extends XPrisonPlayerEvent implements org.bukkit.event.Cancellable
Abstract event class for triggering chance-based enchantments related to a player. This event holds information about the player, the mine region where the event was triggered, the originating block, and the list of blocks affected by the enchantment.
  • Nested Class Summary

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

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

    Fields
    Modifier and Type
    Field
    Description
    protected final List<org.bukkit.block.Block>
     
    protected final org.codemc.worldguardwrapper.region.IWrappedRegion
     
    protected final org.bukkit.block.Block
     
    protected final org.bukkit.entity.Player
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    XPrisonPlayerEnchantTriggerEvent(org.bukkit.entity.Player player, org.codemc.worldguardwrapper.region.IWrappedRegion mineRegion, org.bukkit.block.Block originBlock, List<org.bukkit.block.Block> blocksAffected)
    Constructs a new enchant trigger event.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    void
    setCancelled(boolean cancel)
     

    Methods inherited from class org.bukkit.event.Event

    getEventName, getHandlers, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • player

      protected final org.bukkit.entity.Player player
    • mineRegion

      protected final org.codemc.worldguardwrapper.region.IWrappedRegion mineRegion
    • originBlock

      protected final org.bukkit.block.Block originBlock
    • blocksAffected

      protected final List<org.bukkit.block.Block> blocksAffected
  • Constructor Details

    • XPrisonPlayerEnchantTriggerEvent

      public XPrisonPlayerEnchantTriggerEvent(org.bukkit.entity.Player player, org.codemc.worldguardwrapper.region.IWrappedRegion mineRegion, org.bukkit.block.Block originBlock, List<org.bukkit.block.Block> blocksAffected)
      Constructs a new enchant trigger event.
      Parameters:
      player - Player who triggered the enchant
      mineRegion - Region where the enchant was triggered
      originBlock - Block that triggered the enchantment
      blocksAffected - Blocks that will be affected by the enchantment
  • Method Details

    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancel)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable