Class DialogTicket

java.lang.Object
com.ultikits.ultitools.ui.dialog.DialogTicket

@Internal public final class DialogTicket extends Object
Invalidatable lifetime boundary for server-retained button callbacks.
  • Field Details

  • Constructor Details

  • Method Details

    • report

      private static <R> void report(UiIntent<R> intent, UiBackend.BackendCallbacks<R> callbacks, DialogAnswers answers, ButtonRole role, @Nullable @Nullable io.papermc.paper.dialog.DialogResponseView response, String ownerName)
      Forwards only the value type validated against this same intent.
      Type Parameters:
      R - the intent's answer type
    • shown

      void shown()
      Marks the screen visible only after the presenter returns successfully on the entity lane.
    • accept

      public void accept(ButtonRole role, @Nullable @Nullable io.papermc.paper.dialog.DialogResponseView response, net.kyori.adventure.audience.Audience audience)
      Accepts an action from Paper without running module code directly. Paper dispatches clicks on the server main thread, which also runs entity-lane close operations. This serialization prevents invalidation between consuming the handler and clearing showing below; the two atomic operations alone do not make that transition safe for concurrent callback dispatch.
    • interrupt

      void interrupt()
      Ends a game-interrupted screen without sending a later clear-dialog packet to a different screen.
    • invalidate

      boolean invalidate()
      Drops all references to the intent and callbacks, returning whether a screen still needs dismissal.