aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmod/src/main/java/kr/syeyoung/dungeonsguide/mod/SkyblockStatus.java6
-rwxr-xr-xmod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/DungeonListener.java16
2 files changed, 14 insertions, 8 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/SkyblockStatus.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/SkyblockStatus.java
index e74b69da..96445f7d 100755
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/SkyblockStatus.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/SkyblockStatus.java
@@ -131,14 +131,14 @@ public class SkyblockStatus {
return;
}
- Collection<Score> scores = objective.getScores();
boolean foundDungeon = false;
+
+ Collection<Score> scores = objective.getScores();
for (Score sc : scores) {
String strippedLine = TextUtils.keepScoreboardCharacters(
TextUtils.stripColor(sc.getJustTeam())).trim();
if (strippedLine.contains("Cleared: ")) {
foundDungeon = true;
-
DungeonContext context = DungeonsGuide.getDungeonsGuide().getDungeonFacade().getContext();
if(context != null){
context.setPercentage(Integer.parseInt(
@@ -150,7 +150,7 @@ public class SkyblockStatus {
}
}
- isOnDungeon = foundDungeon;
+ isOnDungeon = locationName.startsWith("The Catacombs") | foundDungeon;
}
}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/DungeonListener.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/DungeonListener.java
index 99e6ae29..2fcdb159 100755
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/DungeonListener.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/DungeonListener.java
@@ -165,11 +165,17 @@ public class DungeonListener {
context.getMapPlayerMarkerProcessor().tick();
context.tick();
} else {
- if (SkyblockStatus.isOnDungeon()) {
- DungeonsGuide.getDungeonsGuide().getDungeonFacade().setContext(new DungeonContext(
- SkyblockStatus.locationName,
- Minecraft.getMinecraft().thePlayer.worldObj));
- MinecraftForge.EVENT_BUS.post(new DungeonStartedEvent());
+ try {
+ if (SkyblockStatus.isOnDungeon()) {
+ DungeonsGuide.getDungeonsGuide().getDungeonFacade().setContext(new DungeonContext(
+ SkyblockStatus.locationName,
+ Minecraft.getMinecraft().thePlayer.worldObj));
+ MinecraftForge.EVENT_BUS.post(new DungeonStartedEvent());
+ }
+ } catch (IllegalStateException e) {
+ if (! "?".equals(e.getMessage())) {
+ e.printStackTrace();
+ }
}
}
}