Class GravePistonExtendEvent

java.lang.Object
org.bukkit.event.Event
dev.cwhead.GravesX.event.graveevent.GraveEvent
dev.cwhead.GravesX.event.GravePistonExtendEvent
All Implemented Interfaces:
Addon, org.bukkit.event.Cancellable
Direct Known Subclasses:
GravePistonExtendEvent

public class GravePistonExtendEvent extends GraveEvent
Represents an event that occurs when a piston extends into a grave location.

This event extends GraveEvent and is cancellable, allowing event listeners to prevent the piston from extending.

  • Constructor Details

    • GravePistonExtendEvent

      public GravePistonExtendEvent(@NotNull @NotNull Grave grave, @Nullable @Nullable org.bukkit.Location location, @NotNull @NotNull org.bukkit.block.Block pistonBlock, @NotNull @NotNull org.bukkit.block.BlockFace direction, @NotNull @NotNull List<org.bukkit.block.Block> movedBlocks)
      Constructs a new GravePistonExtendEvent.
      Parameters:
      grave - The grave associated with the event.
      location - The location of the event (nullable).
      pistonBlock - The piston block involved in the event.
      direction - The direction the piston is extending.
      movedBlocks - The list of blocks being moved by the piston.
  • Method Details

    • getPistonBlock

      @NotNull public @NotNull org.bukkit.block.Block getPistonBlock()
      Gets the piston block involved in this event.
      Returns:
      the piston block.
    • getDirection

      @NotNull public @NotNull org.bukkit.block.BlockFace getDirection()
      Gets the direction in which the piston is extending.
      Returns:
      the direction.
    • getMovedBlocks

      @NotNull public @NotNull List<org.bukkit.block.Block> getMovedBlocks()
      Gets the list of blocks that are being moved by the piston during this extension.
      Returns:
      moved blocks.
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Gets the list of handlers for this event.
      Overrides:
      getHandlers in class GraveEvent
      Returns:
      The handler list for this event.
    • getHandlerList

      @NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()
      Gets the static list of handlers for this event.
      Returns:
      The static handler list for this event.