Class 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
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 -
Method Summary
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, toStringMethods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCode, namespaceMethods inherited from interface org.bukkit.plugin.Plugin
getComponentLogger, getDataPath, getLog4JLogger, getSLF4JLogger
-
Constructor Details
-
MazeEnginePlugin
public MazeEnginePlugin()
-
-
Method Details
-
onEnable
public void onEnable()- Specified by:
onEnablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onEnablein classorg.bukkit.plugin.java.JavaPlugin
-
reloadSettings
-
settings
-
messages
-
mazes
-
visuals
-
actions
-
api
Returns the API provider owned by this plugin instance.Successful startup creates this provider and registers the same instance with Bukkit's
ServicesManagerunderMazeEngineApi. 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
nullbefore initialization
-
commandTree
public com.mojang.brigadier.tree.LiteralCommandNode<io.papermc.paper.command.brigadier.CommandSourceStack> commandTree() -
onDisable
public void onDisable()- Specified by:
onDisablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onDisablein classorg.bukkit.plugin.java.JavaPlugin
-