mcrank FFS output is now consistent with SQL

This commit is contained in:
nossr50
2013-01-16 11:58:14 -08:00
parent 957605d46b
commit fd4f0f4096
2 changed files with 25 additions and 5 deletions

View File

@ -200,23 +200,23 @@ public class Leaderboard {
return info;
}
public static int getPlayerRank(String playerName, SkillType skillType) {
public static int[] getPlayerRank(String playerName, SkillType skillType) {
int currentPos = 1;
List<PlayerStat> statsList = playerStatHash.get(skillType);
if(statsList != null) {
for(PlayerStat ps : statsList) {
if(ps.name.equalsIgnoreCase(playerName)) {
return currentPos;
return new int[] {currentPos, ps.statVal};
} else {
currentPos++;
continue;
}
}
return 0;
return new int[] {0};
} else {
return 0;
return new int[] {0};
}
}