Class GraveBreakEvent

All Implemented Interfaces:
Addon, org.bukkit.event.Cancellable
Direct Known Subclasses:
GraveBreakEvent

public class GraveBreakEvent extends GravePlayerEvent
Represents an event that occurs when a grave is broken by a Player.

This event extends GravePlayerEvent and provides information about the grave and the player involved when the grave is broken.

  • Field Details

    • HANDLERS

      private static final org.bukkit.event.HandlerList HANDLERS
      A static final instance of HandlerList used to manage event handlers.

      This HandlerList is used to register and manage the handlers for events of this type. It provides the mechanism for adding, removing, and invoking event handlers.

  • Constructor Details

    • GraveBreakEvent

      public GraveBreakEvent(@NotNull @NotNull org.bukkit.block.Block block, @NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull Grave grave)
      Constructs a new GraveBreakEvent.
      Parameters:
      block - The block being broken.
      player - The player breaking the block.
      grave - The grave associated with the block being broken.
    • GraveBreakEvent

      public GraveBreakEvent(@NotNull @NotNull org.bukkit.block.Block block, @NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull Grave grave, @Nullable BlockData.BlockType blockType)
      Constructs a new GraveBreakEvent with an optional block type.
      Parameters:
      block - The block being broken.
      player - The player breaking the block.
      grave - The grave associated with the block being broken.
      blockType - The block type if already known (nullable). If null, it will be resolved from the block.
  • Method Details

    • safeLocation

      @NotNull private static @NotNull org.bukkit.Location safeLocation(@NotNull @NotNull org.bukkit.block.Block block, @NotNull @NotNull Grave grave)
    • resolveBlockType

      @Nullable private static BlockData.BlockType resolveBlockType(@Nullable BlockData.BlockType given, @NotNull @NotNull org.bukkit.block.Block block)
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Gets the list of handlers for this event.
      Overrides:
      getHandlers in class GravePlayerEvent
      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.