From 52864d632978a44f12f4268b4caca3e0763ea00f Mon Sep 17 00:00:00 2001 From: tastybento Date: Wed, 23 Oct 2024 21:25:14 -0700 Subject: [PATCH] 326 ordering bug (#364) * Possible fix for #326 * Add a ConversationAbandonedListener --- .../world/bentobox/challenges/panel/ConversationUtils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/world/bentobox/challenges/panel/ConversationUtils.java b/src/main/java/world/bentobox/challenges/panel/ConversationUtils.java index 76873ac..270528f 100644 --- a/src/main/java/world/bentobox/challenges/panel/ConversationUtils.java +++ b/src/main/java/world/bentobox/challenges/panel/ConversationUtils.java @@ -119,6 +119,9 @@ public String getPromptText(@NotNull ConversationContext conversationContext) withFirstPrompt(confirmationPrompt). withLocalEcho(false). withTimeout(90). + // Use null value in consumer to detect if user has abandoned conversation. + addConversationAbandonedListener(ConversationUtils.getAbandonListener(consumer, user)) + . buildConversation(user.getPlayer()). begin(); }