diff options
author | MrFast <78495381+MrFast-js@users.noreply.github.com> | 2024-02-26 14:02:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-26 20:02:02 +0100 |
commit | 03c397d77f5f84e3c054b42ccd6a0b76331fa557 (patch) | |
tree | b5d841a697e4137a33a37271193c9ccc3b0081ea | |
parent | 8f32281cc06aa933507965db2d07605b9f245a27 (diff) | |
download | NotEnoughUpdates-03c397d77f5f84e3c054b42ccd6a0b76331fa557.tar.gz NotEnoughUpdates-03c397d77f5f84e3c054b42ccd6a0b76331fa557.tar.bz2 NotEnoughUpdates-03c397d77f5f84e3c054b42ccd6a0b76331fa557.zip |
Added slayer quest fail handling to Slayer Overlay (#1025)
added slayer quest fail handling
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java b/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java index 68605ed4..16b8493f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java @@ -228,16 +228,17 @@ public class ChatListener { } else if (e.message.getFormattedText().startsWith( EnumChatFormatting.RESET.toString() + EnumChatFormatting.RED + "Invalid recipe ")) { r = ""; + } else if (unformatted.equals(" SLAYER QUEST FAILED!")) { + SlayerOverlay.isSlain = false; + timeSinceLastBoss = 0; } else if (unformatted.equals(" NICE! SLAYER BOSS SLAIN!")) { SlayerOverlay.isSlain = true; } else if (unformatted.equals(" SLAYER QUEST STARTED!")) { SlayerOverlay.isSlain = false; - if (timeSinceLastBoss == 0) { - SlayerOverlay.timeSinceLastBoss = System.currentTimeMillis(); - } else { + if (timeSinceLastBoss != 0) { timeSinceLastBoss2 = timeSinceLastBoss; - timeSinceLastBoss = System.currentTimeMillis(); } + timeSinceLastBoss = System.currentTimeMillis(); } else if (unformatted.startsWith(" RNG Meter")) { RNGMeter = unformatted.substring(" RNG Meter - ".length()); } else if (matcher.matches()) { |