From 900ccba67e9c918169fdb4f1054c661a78c868cd Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 1 Aug 2024 01:12:23 +0100 Subject: [PATCH] add check --- .../cc/fascinated/platform/impl/ScoreSaberPlatform.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/cc/fascinated/platform/impl/ScoreSaberPlatform.java b/src/main/java/cc/fascinated/platform/impl/ScoreSaberPlatform.java index 7191145..9883812 100644 --- a/src/main/java/cc/fascinated/platform/impl/ScoreSaberPlatform.java +++ b/src/main/java/cc/fascinated/platform/impl/ScoreSaberPlatform.java @@ -218,6 +218,13 @@ public class ScoreSaberPlatform extends Platform { log.warn("Failed to update leaderboard '{}' for platform '{}'", id, this.getPlatform().getPlatformName()); continue; } + if (leaderboard.getStars() == 0) { // Check if the leaderboard is ranked + log.warn("Leaderboard '{}' for platform '{}' is not ranked, skipping updating the score pp values", + id, + this.getPlatform().getPlatformName() + ); + continue; + } List toUpdate = scores.stream().filter(score -> { if (!score.getLeaderboardId().equals(id)) { // Check if the leaderboard ID matches