diff options
author | Ascynx <78341107+Ascynx@users.noreply.github.com> | 2023-08-23 20:29:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-23 20:29:24 +0200 |
commit | afd676b9377b336ab3d0eafc6b37190001b69414 (patch) | |
tree | 7d3476409753513b05f539d94ed3c62ba40ed014 /src/main/java/io | |
parent | e56431fb8e825471404de1a0ab41c75a8603a3c8 (diff) | |
download | NotEnoughUpdates-afd676b9377b336ab3d0eafc6b37190001b69414.tar.gz NotEnoughUpdates-afd676b9377b336ab3d0eafc6b37190001b69414.tar.bz2 NotEnoughUpdates-afd676b9377b336ab3d0eafc6b37190001b69414.zip |
Fix DungeonWin overlay consuming requeue message. (#807)
Diffstat (limited to 'src/main/java/io')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java index 5b476c93..2cf09457 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/dungeons/DungeonWin.java @@ -92,6 +92,8 @@ public class DungeonWin { public static List<String> text = new ArrayList<>(); public static long startTime = 0; + private static boolean seenDungeonWinOverlayThisRun = false; + static { for (int i = 0; i < 10; i++) { text.add("{PLACEHOLDER DUNGEON STAT #" + i + "}"); @@ -211,6 +213,7 @@ public class DungeonWin { } SES.schedule(() -> NotEnoughUpdates.INSTANCE.sendChatMessage("/showextrastats"), 100L, TimeUnit.MILLISECONDS); + seenDungeonWinOverlayThisRun = false; } } } @@ -222,8 +225,9 @@ public class DungeonWin { e.setCanceled(true); hideChat = false; displayWin(); + seenDungeonWinOverlayThisRun = true; } else { - if (unformatted.trim().length() > 0) { + if (unformatted.trim().length() > 0 && !seenDungeonWinOverlayThisRun) { if (unformatted.contains("The Catacombs") || unformatted.contains("Master Mode Catacombs") || unformatted.contains("Team Score") || unformatted.contains("Defeated") || unformatted.contains( "Total Damage") @@ -241,7 +245,7 @@ public class DungeonWin { } } } else { - if (unformatted.contains("\u25AC")) { + if (unformatted.contains("\u25AC") && !seenDungeonWinOverlayThisRun) { hideChat = true; text.clear(); e.setCanceled(true); |