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
ConstructorsConstructorDescriptionTickDispatchEvent(@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 TypeMethodDescriptionstatic @NotNull org.bukkit.event.HandlerListReturns the shared handler list required by Bukkit events.@NotNull org.bukkit.event.HandlerListlongReturns the consecutive scan duration represented in milliseconds.@NotNull org.bukkit.inventory.ItemStackgetItem()Returns a snapshot of the item in the scanned slot.@NotNull org.bukkit.entity.PlayerReturns the player currently being scanned.@NotNull org.bukkit.inventory.EquipmentSlotgetSlot()Returns the scanned equipment slot.intReturns the consecutive scan duration represented in ticks.booleanisHeld()Returns whether the scan came from a held-item slot.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
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:
getHandlersin classorg.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
-