Skip to content

Commit

Permalink
Fix last top placeholder (#644)
Browse files Browse the repository at this point in the history
if we had 1 island, topIsland.size() [1] wasn't superior to the placeholder 1 and returned N/A
  • Loading branch information
boiscljo authored Apr 3, 2022
1 parent b91d94c commit ae084ae
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ private static Map<String, Placeholder> getIslandTopPlaceholders() {
{
// Island manager caches this
List<Island> topIslands = IridiumSkyblock.getInstance().getIslandManager().getIslands(IslandManager.SortType.VALUE);
Optional<Island> island = Optional.ofNullable(topIslands.size() > index ? topIslands.get(index - 1) : null);
Optional<Island> island = Optional.ofNullable(topIslands.size() >= index ? topIslands.get(index - 1) : null);
return island;
}));
}
Expand Down

0 comments on commit ae084ae

Please sign in to comment.