aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
diff options
context:
space:
mode:
authorohowe <42757516+carelesshippo@users.noreply.github.com>2021-06-02 11:55:36 -0600
committerohowe <42757516+carelesshippo@users.noreply.github.com>2021-06-02 11:55:36 -0600
commiteeb5c45d71997cb259fc35330490a19db7865603 (patch)
tree65771b27ed837896fa3140dec1af78306accebcd /src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
parent4d9e538ced80728bca74491698347333f515bfcc (diff)
parent1b172089ce502803f7644611afd618ce00dcb860 (diff)
downloadnotenoughupdates-eeb5c45d71997cb259fc35330490a19db7865603.tar.gz
notenoughupdates-eeb5c45d71997cb259fc35330490a19db7865603.tar.bz2
notenoughupdates-eeb5c45d71997cb259fc35330490a19db7865603.zip
Merge branch 'Moulberry:master' into master
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