Class GraveAbandonedExpiredEvent

java.lang.Object
org.bukkit.event.Event
com.ranull.graves.event.GraveEvent
com.ranull.graves.event.GraveAbandonedExpiredEvent
All Implemented Interfaces:
Addon, org.bukkit.event.Cancellable

public class GraveAbandonedExpiredEvent extends GraveEvent implements org.bukkit.event.Cancellable
Represents an event that occurs when an already abandoned grave's abandonment duration expires.

This event extends GraveEvent and implements Cancellable, allowing other plugins to prevent the grave from being dropped or removed after abandonment expiry.

  • 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.

    • cancelled

      private boolean cancelled
  • Constructor Details

    • GraveAbandonedExpiredEvent

      public GraveAbandonedExpiredEvent(Grave grave)
      Constructs a new GraveAbandonedExpiredEvent.
      Parameters:
      grave - The grave that has reached the end of its abandonment timeout.
  • Method Details

    • getHandlerList

      @NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()
      Gets the list of handlers for this event.
      Returns:
      The handler list for this event.
    • 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.
    • isCancelled

      public boolean isCancelled()
      Checks if the event has been cancelled.
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
      Overrides:
      isCancelled in class GraveEvent
      Returns:
      true if the event is cancelled; false otherwise.
    • setCancelled

      public void setCancelled(boolean cancel)
      Sets the cancellation state of this event.
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
      Overrides:
      setCancelled in class GraveEvent
      Parameters:
      cancel - true to cancel the event; false to allow it.