Class PixelPainter
java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
dev.despical.pixelpainter.PixelPainter
- 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 PixelPainter
extends org.bukkit.plugin.java.JavaPlugin
Starts PixelPainter and connects its configuration, commands and painting services.
The entry point owns service lifetimes rather than loading YAML or managing worker queues itself. ConfigurationManager creates and validates resources; TaskExecutor handles blocking image/file work and server-thread callbacks; PaintService owns world jobs, chunk tickets and persistent recovery history.
Startup proceeds in that order so commands cannot observe missing resources or unrecovered journals. Any initialization failure disables the plugin. Shutdown releases world resources before closing the worker executor, leaving completed undo journals available for recovery on the next startup.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncommands()Returns the command dispatcher that tracks per-player preparations.Returns cached source names without starting file I/O during completion.images()Returns the service responsible for local source files and downloads.<T> voidSubmits blocking work through the bounded executor.messages()Returns the current configured message templates.voidReleases world resources and commands before closing the background workers.voidonEnable()painter()Returns the service that owns painting and terrain restoration.palette()Returns the current palette of server-resolved block colors.voidRefreshes cached source names after a worker finishes scanning the image folder.voidDelegates an all-or-nothing resource reload on the server thread.Returns the facade for Paper and Folia region-aware scheduling.settings()Returns the operational settings currently published on the server thread.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
-
PixelPainter
public PixelPainter()
-
-
Method Details
-
onEnable
public void onEnable()- Specified by:
onEnablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onEnablein classorg.bukkit.plugin.java.JavaPlugin
-
reloadSettings
-
io
Submits blocking work through the bounded executor.- Type Parameters:
T- result type- Parameters:
task- worker operation without live Bukkit world accesscompleted- server-thread success handlerfailed- server-thread failure or queue-rejection handler
-
refreshImages
-
onDisable
public void onDisable()Releases world resources and commands before closing the background workers.- Specified by:
onDisablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onDisablein classorg.bukkit.plugin.java.JavaPlugin
-
settings
Returns the operational settings currently published on the server thread.- Returns:
- validated settings after successful initialization
-
messages
Returns the current configured message templates.- Returns:
- validated message resources
-
palette
Returns the current palette of server-resolved block colors.- Returns:
- validated block palette
-
images
Returns the service responsible for local source files and downloads.- Returns:
- image store after successful initialization
-
painter
Returns the service that owns painting and terrain restoration.- Returns:
- server-thread painting service
-
scheduling
Returns the facade for Paper and Folia region-aware scheduling.- Returns:
- scheduler facade after successful initialization
-
commands
Returns the command dispatcher that tracks per-player preparations.- Returns:
- command dispatcher after successful initialization
-
imageNames
-