Class MazeEnginePlugin

java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
dev.despical.mazeengine.MazeEnginePlugin
All Implemented Interfaces:
io.papermc.paper.plugin.lifecycle.event.LifecycleEventOwner, net.kyori.adventure.key.Namespaced, org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

public final class MazeEnginePlugin extends org.bukkit.plugin.java.JavaPlugin
Coordinates the lifecycle of the MazeEngine plugin and its shared services.

Startup installs missing resources, validates configuration, loads saved maze state, and registers commands, listeners, visual sessions, and the Bukkit API provider. A startup failure disables the plugin rather than exposing services with incomplete configuration or missing saved records.

Reload builds a replacement Settings value before publishing it, so invalid configuration leaves the previous settings active. Shutdown unregisters the API and closes integrations, callbacks, displays, and maze workers in order. The service accessors are intended for enabled-plugin use on the server thread.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    api()
    Returns the API provider owned by this plugin instance.
    com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack>
     
     
     
    void
     
    void
     
    void
     
     
     

    Methods inherited from class org.bukkit.plugin.java.JavaPlugin

    getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLifecycleManager, getLogger, getPlugin, getPluginLoader, getPluginMeta, getProvidingPlugin, getResource, getServer, getTextResource, init, init, isEnabled, isNaggable, onCommand, onLoad, onTabComplete, registerCommand, registerCommand, registerCommand, registerCommand, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString

    Methods inherited from class org.bukkit.plugin.PluginBase

    equals, getName, hashCode, namespace

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.bukkit.plugin.Plugin

    getComponentLogger, getDataPath, getLog4JLogger, getSLF4JLogger
  • Constructor Details

    • MazeEnginePlugin

      public MazeEnginePlugin()
  • Method Details

    • onEnable

      public void onEnable()
      Specified by:
      onEnable in interface org.bukkit.plugin.Plugin
      Overrides:
      onEnable in class org.bukkit.plugin.java.JavaPlugin
    • reloadSettings

      public void reloadSettings() throws Exception
      Throws:
      Exception
    • settings

      public Settings settings()
    • messages

      public Messages messages()
    • mazes

      public MazeService mazes()
    • visuals

      public MazeVisuals visuals()
    • actions

      public PendingActions actions()
    • api

      public MazeEngineApi api()
      Returns the API provider owned by this plugin instance.

      Successful startup creates this provider and registers the same instance with Bukkit's ServicesManager under MazeEngineApi. Consumers may use this accessor when they already hold the plugin instance or resolve the registered service after enable.

      Registry access and operation submission follow the API's server-thread requirements. Disabling unregisters the service and closes its operation coordinator; retaining this reference does not extend the provider's usable lifetime. Before initialization, this accessor returns null.

      Returns:
      this plugin's API provider, or null before initialization
    • commandTree

      public com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> commandTree()
    • onDisable

      public void onDisable()
      Specified by:
      onDisable in interface org.bukkit.plugin.Plugin
      Overrides:
      onDisable in class org.bukkit.plugin.java.JavaPlugin