aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorDoKM <mcazzyman@gmail.com>2021-08-01 19:38:05 +0200
committerDoKM <mcazzyman@gmail.com>2021-08-01 19:38:05 +0200
commit09b230ab11159e6e367e0f7145040baf49199410 (patch)
tree2abb10f78b00aa2fb3f8b796444b28d12e1a6512 /src/main
parent7cac988d908f6f97db33362190ea49e4e2a7f14d (diff)
downloadNotEnoughUpdates-09b230ab11159e6e367e0f7145040baf49199410.tar.gz
NotEnoughUpdates-09b230ab11159e6e367e0f7145040baf49199410.tar.bz2
NotEnoughUpdates-09b230ab11159e6e367e0f7145040baf49199410.zip
Hopefully fix slotlocking in dungeons
Cant confirm due to the nature of this bug, but with a larger amount of testers this can be confirmed
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java b/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
index 1a5e168d..243ee151 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
@@ -125,7 +125,7 @@ public class SBInfo {
private static final Pattern SKILL_LEVEL_PATTERN = Pattern.compile("([^0-9:]+) (\\d{1,2})");
public void tick() {
- isInDungeon = false;
+ Boolean tempIsInDungeon = false;
long currentTime = System.currentTimeMillis();
@@ -171,13 +171,16 @@ public class SBInfo {
ScorePlayerTeam scoreplayerteam1 = scoreboard.getPlayersTeam(score.getPlayerName());
String line = ScorePlayerTeam.formatPlayerName(scoreplayerteam1, score.getPlayerName());
line = Utils.cleanDuplicateColourCodes(line);
+
+ String cleanLine = Utils.cleanColour(line);
- if(Utils.cleanColour(line).contains("Dungeon Cleared: ")) {
- isInDungeon = true;
+ if(cleanLine.contains("Dungeon") && cleanLine.contains("Cleared:") && cleanLine.contains("%")) {
+ tempIsInDungeon = true;
}
lines.add(line);
}
+ isInDungeon= tempIsInDungeon;
if(lines.size() >= 5) {
date = Utils.cleanColour(lines.get(1)).trim();