aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
diff options
context:
space:
mode:
authorBuildTools <james.jenour@protonmail.com>2021-05-29 22:02:37 +0800
committerBuildTools <james.jenour@protonmail.com>2021-05-29 22:02:37 +0800
commit1b172089ce502803f7644611afd618ce00dcb860 (patch)
treebcc17b38c97dfdd5a2147aed8e7700700fec732c /src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
parent9aa7b49d224bfde055e12bc84f6908ba0a50090d (diff)
downloadnotenoughupdates-1b172089ce502803f7644611afd618ce00dcb860.tar.gz
notenoughupdates-1b172089ce502803f7644611afd618ce00dcb860.tar.bz2
notenoughupdates-1b172089ce502803f7644611afd618ce00dcb860.zip
PRE28
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java13
1 files changed, 12 insertions, 1 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 13317776..73d61a1e 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
@@ -55,6 +55,7 @@ public class SBInfo {
private long lastLocRaw = -1;
private long joinedWorld = -1;
private JsonObject locraw = null;
+ public boolean isInDungeon = false;
public String currentProfile = null;
@@ -134,10 +135,14 @@ public class SBInfo {
currentProfile = Utils.cleanColour(name.substring(profilePrefix.length()));
}
}
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ try {
Scoreboard scoreboard = Minecraft.getMinecraft().thePlayer.getWorldScoreboard();
- ScoreObjective sidebarObjective = scoreboard.getObjectiveInDisplaySlot(1); //§707/14/20
+ ScoreObjective sidebarObjective = scoreboard.getObjectiveInDisplaySlot(1);
List<Score> scores = new ArrayList<>(scoreboard.getSortedScores(sidebarObjective));
@@ -147,8 +152,14 @@ public class SBInfo {
ScorePlayerTeam scoreplayerteam1 = scoreboard.getPlayersTeam(score.getPlayerName());
String line = ScorePlayerTeam.formatPlayerName(scoreplayerteam1, score.getPlayerName());
line = Utils.cleanDuplicateColourCodes(line);
+
+ if(Utils.cleanColour(line).contains("Dungeon Cleared: ")) {
+ isInDungeon = true;
+ }
+
lines.add(line);
}
+
if(lines.size() >= 5) {
date = Utils.cleanColour(lines.get(1)).trim();
//§74:40am