mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 03:34:43 +02:00
mcrank FFS output is now consistent with SQL
This commit is contained in:
@ -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};
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user