fix npe
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 36s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 36s
This commit is contained in:
parent
560fce9b01
commit
1d4e19bd3c
@ -216,10 +216,10 @@ public class ScoreSaberPlatform extends Platform {
|
|||||||
if (!score.getLeaderboardId().equals(id)) { // Check if the leaderboard ID matches
|
if (!score.getLeaderboardId().equals(id)) { // Check if the leaderboard ID matches
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
double oldPp = score.getPp();
|
double oldPp = score.getPp() == null ? 0 : score.getPp();
|
||||||
double pp = this.getPp(leaderboard.getStars(), score.getAccuracy());
|
double pp = this.getPp(leaderboard.getStars(), score.getAccuracy());
|
||||||
log.info("Leaderboard: {}, Old PP: {}, New PP: {}", leaderboard.getSongName(), oldPp, pp);
|
log.info("Leaderboard: {}, Old PP: {}, New PP: {}", leaderboard.getSongName(), oldPp, pp);
|
||||||
return pp != score.getPp(); // Check if the pp has changed
|
return pp != oldPp; // Check if the pp has changed
|
||||||
}).toList();
|
}).toList();
|
||||||
|
|
||||||
for (TrackedScore score : toUpdate) { // Update the scores
|
for (TrackedScore score : toUpdate) { // Update the scores
|
||||||
|
Reference in New Issue
Block a user