mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-14 14:24:37 +01:00
Dont write challenge history if the player didnt get any stars
This commit is contained in:
@@ -88,6 +88,9 @@ public class ChallengeManager extends BasePlayerManager {
|
||||
}
|
||||
|
||||
public void addHistory(int challengeId, int stars) {
|
||||
// Dont write challenge history if the player didnt get any stars
|
||||
if (stars <= 0) return;
|
||||
|
||||
// Get history info
|
||||
var info = this.getHistory().computeIfAbsent(challengeId, id -> new ChallengeHistory(getPlayer(), id));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user