Class ConfigurationManager
java.lang.Object
dev.despical.pixelpainter.config.ConfigurationManager
Creates bundled configuration files and publishes validated resource snapshots.
A reload first reads settings, messages and the block palette into local candidates. Active references change only after all candidates are valid, so a malformed resource cannot leave the plugin partly reconfigured.
Call this manager on the server thread: palette validation resolves Bukkit block data. Existing image preparations and painting jobs keep the settings and colors they captured before a later reload.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationManager(org.bukkit.plugin.java.JavaPlugin plugin) Creates a manager without writing files or loading configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoidCopies missing bundled resources and loads the first validated snapshot.messages()Returns the current message templates.palette()Returns the current server-resolved block palette.voidreload()Loads all candidates before replacing the active configuration references.settings()Returns the current operational limits and presentation settings.
-
Constructor Details
-
ConfigurationManager
public ConfigurationManager(org.bukkit.plugin.java.JavaPlugin plugin) Creates a manager without writing files or loading configuration.- Parameters:
plugin- owner of the bundled resources and data directory
-
-
Method Details
-
initialize
-
reload
-
settings
Returns the current operational limits and presentation settings.- Returns:
- validated settings after initialization
-
messages
Returns the current message templates.- Returns:
- validated messages after initialization
-
palette
Returns the current server-resolved block palette.- Returns:
- validated palette after initialization
-