public interface ScoreCriterionProgress extends CriterionProgress
ScoreAdvancementCriterion.| Modifier and Type | Method and Description |
|---|---|
Optional<Instant> |
add(int score)
Adds the target score value, the score cannot exceed
the goal value (
getGoal()). |
ScoreAdvancementCriterion |
getCriterion()
Gets the
AdvancementCriterion. |
default int |
getGoal()
Gets the goal value.
|
int |
getScore()
Gets the score value.
|
Optional<Instant> |
remove(int score)
Removes the target score value, the score cannot go under zero.
|
Optional<Instant> |
set(int score)
Adds the target score value, the score cannot exceed
the goal value (
getGoal()) or be under zero. |
achieved, get, grant, revokeScoreAdvancementCriterion getCriterion()
CriterionProgressAdvancementCriterion.getCriterion in interface CriterionProgressdefault int getGoal()
int getScore()
Optional<Instant> set(int score)
getGoal()) or be under zero.
The achieved time will be returned if the goal is met.score - The score to setOptional<Instant> add(int score)
getGoal()). The achieved time
will be returned if the goal is met.score - The score to add