mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-27 19:17:44 +01:00
Fixing some NPEs related to having an empty leaderboard.
This commit is contained in:
parent
75e52bbe66
commit
a64e177c21
@ -48,6 +48,7 @@ public class Leaderboard {
|
|||||||
|
|
||||||
while ((line = in.readLine()) != null) {
|
while ((line = in.readLine()) != null) {
|
||||||
String[] character = line.split(":");
|
String[] character = line.split(":");
|
||||||
|
|
||||||
String p = character[0];
|
String p = character[0];
|
||||||
int powerLevel = 0;
|
int powerLevel = 0;
|
||||||
|
|
||||||
@ -126,6 +127,9 @@ public class Leaderboard {
|
|||||||
plugin.getLogger().severe(("Exception while reading " + location + " (Are you sure you formatted it correctly?)" + e.toString()));
|
plugin.getLogger().severe(("Exception while reading " + location + " (Are you sure you formatted it correctly?)" + e.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(PowerLevel.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
//Sort the leader boards
|
//Sort the leader boards
|
||||||
SkillComparator c = new SkillComparator();
|
SkillComparator c = new SkillComparator();
|
||||||
Collections.sort(Mining, c);
|
Collections.sort(Mining, c);
|
||||||
|
Loading…
Reference in New Issue
Block a user