mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-13 22:04:36 +01:00
Prevent score in challenge history from being overwritten by a worse score
This commit is contained in:
@@ -32,6 +32,10 @@ public class ChallengeHistory {
|
||||
this.challengeId = challengeId;
|
||||
}
|
||||
|
||||
public void setStars(int stars) {
|
||||
this.stars = Math.max(this.stars, stars);
|
||||
}
|
||||
|
||||
public Challenge toProto() {
|
||||
var proto = Challenge.newInstance()
|
||||
.setChallengeId(this.getChallengeId())
|
||||
|
||||
Reference in New Issue
Block a user