mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-14 14:24:37 +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;
|
this.challengeId = challengeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setStars(int stars) {
|
||||||
|
this.stars = Math.max(this.stars, stars);
|
||||||
|
}
|
||||||
|
|
||||||
public Challenge toProto() {
|
public Challenge toProto() {
|
||||||
var proto = Challenge.newInstance()
|
var proto = Challenge.newInstance()
|
||||||
.setChallengeId(this.getChallengeId())
|
.setChallengeId(this.getChallengeId())
|
||||||
|
|||||||
Reference in New Issue
Block a user