Skip to content

Commit

Permalink
Challenges now show the highest rank available.
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Mar 14, 2015
1 parent b43d079 commit 0149098
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/com/wasteofplastic/askyblock/commands/Challenges.java
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,15 @@ public boolean isLevelAvailable(final Player player, final String level) {
* @return inventory
*/
public Inventory challengePanel(Player player) {
return challengePanel(player, "");
// Get the highest level the player has achieved
String maxLevel = "";
for (String level : Settings.challengeLevels) {
if (checkLevelCompletion(player, level) > 0) {
maxLevel = level;
break;
}
}
return challengePanel(player, maxLevel);
}

/**
Expand Down

0 comments on commit 0149098

Please sign in to comment.