Class PaperDialogPresenter

java.lang.Object
com.ultikits.ultitools.ui.dialog.PaperDialogPresenter
All Implemented Interfaces:
DialogPresenter

@Internal public final class PaperDialogPresenter extends Object implements DialogPresenter
The only adapter that constructs server-owned Paper dialog registry objects. Button callbacks expire after 12 hours of real elapsed time, whereas session timeouts use scheduler ticks. Under severe server lag the buttons can therefore expire before the session timeout is processed.
  • Constructor Details

    • PaperDialogPresenter

      public PaperDialogPresenter()
  • Method Details

    • show

      public void show(org.bukkit.entity.Player viewer, DialogModel model, DialogTicket ticket)
      Description copied from interface: DialogPresenter
      Shows the model, retaining only the invalidatable ticket in button callbacks.
      Specified by:
      show in interface DialogPresenter
    • multiAction

      private static io.papermc.paper.registry.data.dialog.type.DialogType multiAction(DialogModel model, List<io.papermc.paper.registry.data.dialog.ActionButton> buttons, DialogTicket ticket)
    • button

      private static io.papermc.paper.registry.data.dialog.ActionButton button(DialogModel.Button button, DialogTicket ticket)
    • input

      private static io.papermc.paper.registry.data.dialog.input.DialogInput input(DialogModel.Input input)
    • text

      private static io.papermc.paper.registry.data.dialog.input.TextDialogInput text(DialogModel.Text text)
    • dismiss

      public void dismiss(org.bukkit.entity.Player viewer)
      Description copied from interface: DialogPresenter
      Dismisses the viewer's currently showing dialog.
      Specified by:
      dismiss in interface DialogPresenter