Skip to content

Commit

Permalink
fix: DungeonListener#team doesn't update after disconnecting
Browse files Browse the repository at this point in the history
fixes NPE

cherry picked from 2c7a5b5
  • Loading branch information
My-Name-Is-Jeff committed Mar 9, 2024
1 parent a349af0 commit 25935e4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ object DungeonListener {
}
}
tickTimer(2, repeats = true) {
if (Utils.inDungeons && (DungeonTimer.scoreShownAt == -1L || System.currentTimeMillis() - DungeonTimer.scoreShownAt < 1500)) {
if (Utils.inDungeons && mc.thePlayer != null && (DungeonTimer.scoreShownAt == -1L || System.currentTimeMillis() - DungeonTimer.scoreShownAt < 1500)) {
val tabEntries = TabListUtils.tabEntries
if (team.isEmpty() || (DungeonTimer.dungeonStartTime != -1L && team.values.any { it.dungeonClass == DungeonClass.EMPTY })) {
if (tabEntries.isNotEmpty() && tabEntries[0].second.contains("§r§b§lParty §r§f(")) {
Expand Down

0 comments on commit 25935e4

Please sign in to comment.