Interface DialogueProvider


public interface DialogueProvider
Abstraction used by LuxDialogues to interact with the concrete dialogue system.

Implementations are responsible for rendering, redirecting and clearing dialogues for players and for exposing runtime state.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    clearDialogue(org.bukkit.entity.Player player)
    Clears any active dialogue for the given player.
    getDialogue(org.bukkit.entity.Player player)
    Gets the dialogue instance currently associated with the player.
    getPlayerPageTimer(org.bukkit.entity.Player player)
    Gets whether a page timer is currently active for the player.
    isInCommandCooldown(org.bukkit.entity.Player player)
    Checks whether the player is in a command cooldown related to dialogue interaction.
    isInDialogue(org.bukkit.entity.Player player)
    Checks whether the given player is currently in a dialogue.
    isTyping(org.bukkit.entity.Player player)
    Checks whether the dialogue system is currently typing out text for the player.
    void
    redirectDialogue(org.bukkit.entity.Player player, String dialogue, String pageID)
    Redirects an active dialogue for a player to a dialogue by ID.
    void
    redirectDialogue(org.bukkit.entity.Player player, Dialogue dialogue, String pageID)
    Redirects an active dialogue for a player to a new dialogue instance.
    void
    sendDialogue(org.bukkit.entity.Player player, String dialogue, String pageID)
    Sends a dialogue by ID to a player, starting at a specific page.
    void
    sendDialogue(org.bukkit.entity.Player player, Dialogue dialogue, String pageID)
    Sends the given dialogue to a player, starting at a specific page.
    void
    triggerInteraction(org.bukkit.entity.Player player)
    Triggers a dialogue interaction for the given player (for example from a command or click).
  • Method Details

    • sendDialogue

      void sendDialogue(org.bukkit.entity.Player player, Dialogue dialogue, String pageID)
      Sends the given dialogue to a player, starting at a specific page.
      Parameters:
      player - target player
      dialogue - dialogue instance to display
      pageID - ID of the initial page to open
    • sendDialogue

      void sendDialogue(org.bukkit.entity.Player player, String dialogue, String pageID)
      Sends a dialogue by ID to a player, starting at a specific page.
      Parameters:
      player - target player
      dialogue - dialogue identifier
      pageID - ID of the initial page to open
    • redirectDialogue

      void redirectDialogue(org.bukkit.entity.Player player, Dialogue dialogue, String pageID)
      Redirects an active dialogue for a player to a new dialogue instance.
      Parameters:
      player - target player
      dialogue - new dialogue instance
      pageID - ID of the page to redirect to
    • redirectDialogue

      void redirectDialogue(org.bukkit.entity.Player player, String dialogue, String pageID)
      Redirects an active dialogue for a player to a dialogue by ID.
      Parameters:
      player - target player
      dialogue - new dialogue identifier
      pageID - ID of the page to redirect to
    • clearDialogue

      void clearDialogue(org.bukkit.entity.Player player)
      Clears any active dialogue for the given player.
      Parameters:
      player - target player
    • triggerInteraction

      void triggerInteraction(org.bukkit.entity.Player player)
      Triggers a dialogue interaction for the given player (for example from a command or click).
      Parameters:
      player - target player
    • isInDialogue

      Boolean isInDialogue(org.bukkit.entity.Player player)
      Checks whether the given player is currently in a dialogue.
      Parameters:
      player - player to check
      Returns:
      true if the player has an active dialogue
    • isTyping

      Boolean isTyping(org.bukkit.entity.Player player)
      Checks whether the dialogue system is currently typing out text for the player.
      Parameters:
      player - player to check
      Returns:
      true if text is being typed for the player
    • isInCommandCooldown

      Boolean isInCommandCooldown(org.bukkit.entity.Player player)
      Checks whether the player is in a command cooldown related to dialogue interaction.
      Parameters:
      player - player to check
      Returns:
      true if the player is cooling down
    • getPlayerPageTimer

      Boolean getPlayerPageTimer(org.bukkit.entity.Player player)
      Gets whether a page timer is currently active for the player.
      Parameters:
      player - player to check
      Returns:
      true if a page timer is running, false otherwise
    • getDialogue

      Dialogue getDialogue(org.bukkit.entity.Player player)
      Gets the dialogue instance currently associated with the player.
      Parameters:
      player - player to query
      Returns:
      active Dialogue, or null if none