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 TypeMethodDescriptionvoidclearDialogue(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.voidredirectDialogue(org.bukkit.entity.Player player, String dialogue, String pageID) Redirects an active dialogue for a player to a dialogue by ID.voidredirectDialogue(org.bukkit.entity.Player player, Dialogue dialogue, String pageID) Redirects an active dialogue for a player to a new dialogue instance.voidsendDialogue(org.bukkit.entity.Player player, String dialogue, String pageID) Sends a dialogue by ID to a player, starting at a specific page.voidsendDialogue(org.bukkit.entity.Player player, Dialogue dialogue, String pageID) Sends the given dialogue to a player, starting at a specific page.voidtriggerInteraction(org.bukkit.entity.Player player) Triggers a dialogue interaction for the given player (for example from a command or click).
-
Method Details
-
sendDialogue
-
sendDialogue
-
redirectDialogue
-
redirectDialogue
-
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
Checks whether the given player is currently in a dialogue.- Parameters:
player- player to check- Returns:
trueif the player has an active dialogue
-
isTyping
Checks whether the dialogue system is currently typing out text for the player.- Parameters:
player- player to check- Returns:
trueif text is being typed for the player
-
isInCommandCooldown
Checks whether the player is in a command cooldown related to dialogue interaction.- Parameters:
player- player to check- Returns:
trueif the player is cooling down
-
getPlayerPageTimer
Gets whether a page timer is currently active for the player.- Parameters:
player- player to check- Returns:
trueif a page timer is running,falseotherwise
-
getDialogue
-