Class UiManager
java.lang.Object
com.ultikits.ultitools.manager.UiManager
- All Implemented Interfaces:
AutoCloseable
Framework-owned assembly and per-module-copy UI lifetime.
All methods must be called on the server thread.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ChestListenerprivate final UiDialogInterruptListenerprivate final UiQuitListenerprivate final UiRuntimeprivate final Map<UltiToolsPlugin, UiService> -
Constructor Summary
ConstructorsConstructorDescriptionUiManager(UiRuntime runtime, DialogBackend dialogs) Retains the runtime and the listeners that belong to it. -
Method Summary
Modifier and TypeMethodDescriptionvoidStarts the common storage-wait budget before the framework unloads its first module.voidclose()Explicitly closed before root-container destruction retires the framework scheduler.static UiManagercreate(Scheduler frameworkScheduler, Messages frameworkMessages, ItemRenderer items, Logger logger, Thread serverThread, DialogPresenter presenter) Assembles both backends on the framework scheduler, never on a module's scheduler.voidregisterListeners(org.bukkit.plugin.Plugin bukkitPlugin) Installs event routing before any module can display a screen.(package private) UiRuntimeruntime()serviceFor(UltiToolsPlugin plugin) Issues exactly one service per module instance; names do not identify a module copy.voidunload(UltiToolsPlugin plugin) Ends a copy's sessions before its tasks, storage or unload hook can be retired.
-
Field Details
-
runtime
-
chestListener
-
quitListener
-
interruptListener
-
services
-
-
Constructor Details
-
UiManager
Retains the runtime and the listeners that belong to it.
-
-
Method Details
-
create
public static UiManager create(Scheduler frameworkScheduler, Messages frameworkMessages, ItemRenderer items, Logger logger, Thread serverThread, DialogPresenter presenter) Assembles both backends on the framework scheduler, never on a module's scheduler. -
serviceFor
Issues exactly one service per module instance; names do not identify a module copy. -
unload
Ends a copy's sessions before its tasks, storage or unload hook can be retired. -
registerListeners
public void registerListeners(org.bukkit.plugin.Plugin bukkitPlugin) Installs event routing before any module can display a screen. -
runtime
UiRuntime runtime() -
beginShutdown
public void beginShutdown()Starts the common storage-wait budget before the framework unloads its first module. -
close
public void close()Explicitly closed before root-container destruction retires the framework scheduler.- Specified by:
closein interfaceAutoCloseable
-