Interface IDialog


public interface IDialog
Interface for interacting with dialog interfaces in the game.

This interface provides methods to handle NPC dialogs, player dialogs, option menus, and various input dialogs. It supports continuing conversations, selecting options, entering text or numeric input, and managing dialog state.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks if the dialog can be continued (has a "Click here to continue" prompt).
    boolean
    chooseOption(int index)
    Chooses a dialog option by its one-based index.
    default boolean
    chooseOption(String... options)
    Chooses a dialog option that contains any of the specified text strings.
    default boolean
    Chooses a dialog option that matches the specified predicate.
    void
    Continues the dialog by pressing space or clicking the continue button.
    void
    Continues the tutorial dialog by clicking the appropriate button.
    default void
    enterAmount(int input)
    Enters a numeric amount into an amount input dialog.
    default void
    Enters a chat channel name into the chat channel input dialog.
    default void
    Enters a friend's name into the friend name input dialog.
    default void
    Enters a name into a general name input dialog.
    default void
    Enters text into a general text input dialog.
    void
    Forces the dialog interface to close.
    void
    Forces the dialog interface to open.
    Gets the name displayed in the dialog (typically the NPC name).
    default IWidget
    getOption(String option)
    Gets the widget for a dialog option matching the specified text.
    default IWidget
    Gets the widget for a dialog option matching the specified predicate.
    Gets all available dialog option widgets.
    Gets the title widget displayed above the dialog options.
    Gets the main text content of the current dialog.
    default boolean
    hasOption(String option)
    Checks if the dialog has an option matching the specified text.
    default boolean
    Checks if the dialog has an option matching the specified predicate.
    void
    input(int inputType, String value)
    Sends input to the currently open input dialog with a specific input type.
    boolean
    Checks if an input dialog (for entering text or numbers) is currently open.
    boolean
    Checks if any dialog interface is currently open.
    default boolean
    Checks if the dialog is currently showing selectable options.
  • Method Details

    • continueTutorial

      void continueTutorial()
      Continues the tutorial dialog by clicking the appropriate button. Used specifically for tutorial island and similar guided content.
    • isEnterInputOpen

      boolean isEnterInputOpen()
      Checks if an input dialog (for entering text or numbers) is currently open.
      Returns:
      true if an input dialog is open, false otherwise
    • isOpen

      boolean isOpen()
      Checks if any dialog interface is currently open.
      Returns:
      true if a dialog is open, false otherwise
    • input

      void input(int inputType, String value)
      Sends input to the currently open input dialog with a specific input type.
      Parameters:
      inputType - the type of input (2=friend name, 7=amount, 8=name, 9=text, 10=chat channel)
      value - the value to input
    • enterFriendName

      default void enterFriendName(String input)
      Enters a friend's name into the friend name input dialog.
      Parameters:
      input - the friend's name to enter
    • enterChatChannelName

      default void enterChatChannelName(String input)
      Enters a chat channel name into the chat channel input dialog.
      Parameters:
      input - the chat channel name to enter
    • enterName

      default void enterName(String input)
      Enters a name into a general name input dialog.
      Parameters:
      input - the name to enter
    • enterText

      default void enterText(String input)
      Enters text into a general text input dialog.
      Parameters:
      input - the text to enter
    • enterAmount

      default void enterAmount(int input)
      Enters a numeric amount into an amount input dialog.
      Parameters:
      input - the amount to enter
    • hasOption

      default boolean hasOption(String option)
      Checks if the dialog has an option matching the specified text.
      Parameters:
      option - the exact text to match
      Returns:
      true if a matching option exists, false otherwise
    • hasOption

      default boolean hasOption(Predicate<String> option)
      Checks if the dialog has an option matching the specified predicate.
      Parameters:
      option - the predicate to match against option text
      Returns:
      true if a matching option exists, false otherwise
    • getOption

      default IWidget getOption(String option)
      Gets the widget for a dialog option matching the specified text.
      Parameters:
      option - the exact text to match
      Returns:
      the matching option widget, or null if not found
    • getOption

      default IWidget getOption(Predicate<String> option)
      Gets the widget for a dialog option matching the specified predicate.
      Parameters:
      option - the predicate to match against option text
      Returns:
      the matching option widget, or null if not found
    • chooseOption

      default boolean chooseOption(String... options)
      Chooses a dialog option that contains any of the specified text strings.
      Parameters:
      options - the option texts to search for (partial match)
      Returns:
      true if an option was successfully selected, false otherwise
    • chooseOption

      default boolean chooseOption(Predicate<String> option)
      Chooses a dialog option that matches the specified predicate.
      Parameters:
      option - the predicate to match against option text
      Returns:
      true if an option was successfully selected, false otherwise
    • chooseOption

      boolean chooseOption(int index)
      Chooses a dialog option by its one-based index.
      Parameters:
      index - the one-based index of the option to select (1 for first option, etc.)
      Returns:
      true if the option was successfully selected, false otherwise
    • canContinue

      boolean canContinue()
      Checks if the dialog can be continued (has a "Click here to continue" prompt).
      Returns:
      true if the dialog can be continued, false otherwise
    • continueSpace

      void continueSpace()
      Continues the dialog by pressing space or clicking the continue button.
    • isViewingOptions

      default boolean isViewingOptions()
      Checks if the dialog is currently showing selectable options.
      Returns:
      true if options are visible, false otherwise
    • getOptionTitle

      IWidget getOptionTitle()
      Gets the title widget displayed above the dialog options.
      Returns:
      the title widget, or null if no title is present
    • getOptions

      List<IWidget> getOptions()
      Gets all available dialog option widgets.
      Returns:
      a list of option widgets, empty list if no options are available
    • forceOpen

      void forceOpen()
      Forces the dialog interface to open. This is typically used for debugging or special cases.
    • forceClose

      void forceClose()
      Forces the dialog interface to close.
    • getText

      String getText()
      Gets the main text content of the current dialog.
      Returns:
      the dialog text, or null if no dialog is open
    • getName

      String getName()
      Gets the name displayed in the dialog (typically the NPC name).
      Returns:
      the name shown in the dialog, or null if not available