From dcd661c9108005b43f595d010c92d3221f866fb8 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sun, 3 Oct 2021 23:07:35 +0900 Subject: - FIX: Trivia throwing answers in middle of answers --- .../syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java index a6199c25..dcf4434a 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorTrivia.java @@ -49,11 +49,16 @@ public class RoomProcessorTrivia extends GeneralRoomProcessor { private final List questionDialog = new ArrayList(); private boolean questionDialogStart = false; + private boolean parseDialog = false; @Override public void chatReceived(IChatComponent chat) { super.chatReceived(chat); if (!FeatureRegistry.SOLVER_KAHOOT.isEnabled()) return; String ch2 = chat.getUnformattedText(); + if (parseDialog) { + parseDialog = false; + parseDialog(); + } if (chat.getFormattedText().contains("§r§6§lQuestion ")) { questionDialogStart = true; questionDialog.clear(); @@ -64,7 +69,7 @@ public class RoomProcessorTrivia extends GeneralRoomProcessor { if (chat.getFormattedText().contains("§r§6 ⓒ")) { questionDialogStart = false; - parseDialog(); + parseDialog = true; } } public static final Pattern anwerPattern = Pattern.compile("§r§6 . §a(.+)§r"); -- cgit