Class MazeOperationCompletedEvent

java.lang.Object
org.bukkit.event.Event
dev.despical.mazeengine.api.event.MazeOperationCompletedEvent

public final class MazeOperationCompletedEvent extends org.bukkit.event.Event
Called after a maze operation has completed successfully.

This event is fired synchronously on the server thread for both command and API operations. By the time listeners run:

  • The requested world work has finished
  • Final metadata has been saved, or deleted for removal
  • The operation's name reservation has been released
The event is not cancellable. It reports a finished action rather than offering a preflight veto. Success does not imply that the actor has been teleported.

Typical use cases:

  • Updating menus or statistics after maze creation and rebuilding
  • Recording completed operation identities and final descriptions
  • Reacting to removal using the retained DELETED maze snapshot
The result is immutable and can be retained after the event returns. For a removed maze, querying the registry by its name will no longer return that record.
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    Constructs a completion event containing the successful result.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
    Returns the static registry required for Bukkit listener registration.
    @NotNull org.bukkit.event.HandlerList
    Returns the listener registry used to dispatch this event.
    Returns the final outcome reported by this event.

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class Object

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

    • MazeOperationCompletedEvent

      public MazeOperationCompletedEvent(OperationResult result)
      Constructs a completion event containing the successful result.

      Constructing the event does not dispatch it or perform world work. The plugin dispatches it after successful operation cleanup and persistence.

      Parameters:
      result - the completed operation result
      Throws:
      NullPointerException - if result is null
  • Method Details

    • result

      public OperationResult result()
      Returns the final outcome reported by this event.

      Use the operation kind to distinguish creation, regeneration, repair, and removal. The result's maze description is safe to retain.

      Returns:
      the immutable successful operation result
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Returns the listener registry used to dispatch this event.

      The same registry is shared by all instances of this event class.

      Specified by:
      getHandlers in class org.bukkit.event.Event
      Returns:
      the Bukkit handler list for this event type
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Returns the static registry required for Bukkit listener registration.

      Bukkit uses this method to associate registered listeners with this event type before any event instance is dispatched.

      Returns:
      the Bukkit handler list shared by this event class