Skip to content

Commit

Permalink
Fix mission slot NullPointerException (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlsf authored Feb 8, 2022
1 parent 7201b5c commit 54b9cbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,10 @@ public synchronized Map<String, Mission> getDailyIslandMissions(@NotNull Island
IntStream.range(0, IridiumSkyblock.getInstance().getMissions().dailySlots.size())
.boxed()
.map(i -> getDailyIslandMission(island, i))
.sorted(Comparator.comparingInt(mission -> IridiumSkyblock.getInstance().getMissionsList().get(mission).getItem().slot))
.sorted(Comparator.comparingInt(mission -> {
Integer slot = IridiumSkyblock.getInstance().getMissionsList().get(mission).getItem().slot;
return slot == null ? 0 : slot;
}))
.forEachOrdered(mission ->
missions.put(mission, IridiumSkyblock.getInstance().getMissionsList().get(mission))
);
Expand Down

0 comments on commit 54b9cbc

Please sign in to comment.