mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-14 22:34:35 +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) {
|
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
|
// Get history info
|
||||||
var info = this.getHistory().computeIfAbsent(challengeId, id -> new ChallengeHistory(getPlayer(), id));
|
var info = this.getHistory().computeIfAbsent(challengeId, id -> new ChallengeHistory(getPlayer(), id));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user