Class UiManager

java.lang.Object
com.ultikits.ultitools.manager.UiManager
All Implemented Interfaces:
AutoCloseable

@Internal public final class UiManager extends Object implements AutoCloseable
Framework-owned assembly and per-module-copy UI lifetime. All methods must be called on the server thread.
  • Field Details

  • Constructor Details

    • UiManager

      public UiManager(UiRuntime runtime, DialogBackend dialogs)
      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

      public UiService serviceFor(UltiToolsPlugin plugin)
      Issues exactly one service per module instance; names do not identify a module copy.
    • unload

      public void unload(UltiToolsPlugin plugin)
      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:
      close in interface AutoCloseable