Class MazeApiProvider

java.lang.Object
dev.despical.mazeengine.service.api.MazeApiProvider
All Implemented Interfaces:
MazeEngineApi

public final class MazeApiProvider extends Object implements MazeEngineApi
Implements the Bukkit-registered public API using the plugin's internal services.

The provider exposes registry, preset, and operation adapters without placing their implementation classes in the consumable API JAR. It checks server thread and enabled-plugin access, converts saved records to immutable public snapshots, and caches graph summaries by layout identity.

Terminal service outcomes are translated into completion or failure events. Successful deletion produces a retained DELETED snapshot; failed planning can produce an event with no maze description. Wrapper exceptions are unwrapped before being exposed as public failure causes.

  • Constructor Details

  • Method Details

    • preset

      public PresetSnapshot preset(Preset preset)
    • snapshot

      public MazeSnapshot snapshot(MazeRecord record)
    • mazes

      public MazeRegistry mazes()
      Description copied from interface: MazeEngineApi
      Returns the registry used to inspect saved mazes.

      The registry exposes immutable descriptions, teleport destinations, and routes through the saved cell graph. Its queries require the server thread.

      Specified by:
      mazes in interface MazeEngineApi
      Returns:
      the maze query service
    • presets

      public PresetRegistry presets()
      Description copied from interface: MazeEngineApi
      Returns the registry describing the currently configured presets.

      Successful configuration reloads affect subsequent preset queries. Preset metadata already captured in a saved maze remains unchanged.

      Specified by:
      presets in interface MazeEngineApi
      Returns:
      the current preset query service
    • operations

      public MazeOperations operations()
      Description copied from interface: MazeEngineApi
      Returns the service used to submit world-editing operations.

      Requests use the plugin's normal permission, ownership, and action-specific safety checks. Each accepted request returns a handle for that operation.

      Specified by:
      operations in interface MazeEngineApi
      Returns:
      the maze operation service