Class TickDispatchEvent

java.lang.Object
org.bukkit.event.Event
io.artificial.enchantments.internal.TickDispatchEvent

public final class TickDispatchEvent extends org.bukkit.event.Event
Synthetic event used to carry tick-scan data into the dispatch spine.
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    TickDispatchEvent(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.inventory.ItemStack item, @NotNull org.bukkit.inventory.EquipmentSlot slot, boolean held, int tickCount, long heldDuration)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NotNull org.bukkit.event.HandlerList
    Returns the shared handler list required by Bukkit events.
    @NotNull org.bukkit.event.HandlerList
     
    long
    Returns the consecutive scan duration represented in milliseconds.
    @NotNull org.bukkit.inventory.ItemStack
    Returns a snapshot of the item in the scanned slot.
    @NotNull org.bukkit.entity.Player
    Returns the player currently being scanned.
    @NotNull org.bukkit.inventory.EquipmentSlot
    Returns the scanned equipment slot.
    int
    Returns the consecutive scan duration represented in ticks.
    boolean
    Returns whether the scan came from a held-item slot.

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

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

    • TickDispatchEvent

      public TickDispatchEvent(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.inventory.ItemStack item, @NotNull @NotNull org.bukkit.inventory.EquipmentSlot slot, boolean held, int tickCount, long heldDuration)
  • Method Details

    • getPlayer

      @NotNull public @NotNull org.bukkit.entity.Player getPlayer()
      Returns the player currently being scanned.
      Returns:
      player owning the scanned slot
    • getItem

      @NotNull public @NotNull org.bukkit.inventory.ItemStack getItem()
      Returns a snapshot of the item in the scanned slot.
      Returns:
      cloned item snapshot
    • getSlot

      @NotNull public @NotNull org.bukkit.inventory.EquipmentSlot getSlot()
      Returns the scanned equipment slot.
      Returns:
      slot being scanned
    • isHeld

      public boolean isHeld()
      Returns whether the scan came from a held-item slot.
      Returns:
      true for held-item scans, false for armor scans
    • getTickCount

      public int getTickCount()
      Returns the consecutive scan duration represented in ticks.
      Returns:
      consecutive scan duration in ticks
    • getHeldDuration

      public long getHeldDuration()
      Returns the consecutive scan duration represented in milliseconds.
      Returns:
      consecutive scan duration in milliseconds
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      @NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()
      Returns the shared handler list required by Bukkit events.
      Returns:
      handler list for this synthetic event type