Interface ScoreCriterionProgress
-
- All Superinterfaces:
CriterionProgress,Progressable
public interface ScoreCriterionProgress extends CriterionProgress
Represents the progress of aScoreAdvancementCriterion.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Optional<Instant>add(int score)Adds the target score value, the score cannot exceed the goal value (goal()).ScoreAdvancementCriterioncriterion()Gets theAdvancementCriterion.default intgoal()Gets the goal value.Optional<Instant>remove(int score)Removes the target score value, the score cannot go under zero.intscore()Gets the score value.Optional<Instant>set(int score)Adds the target score value, the score cannot exceed the goal value (goal()) or be under zero.-
Methods inherited from interface org.spongepowered.api.advancement.Progressable
achieved, get, grant, revoke
-
-
-
-
Method Detail
-
criterion
ScoreAdvancementCriterion criterion()
Description copied from interface:CriterionProgressGets theAdvancementCriterion.- Specified by:
criterionin interfaceCriterionProgress- Returns:
- The criterion
-
goal
default int goal()
Gets the goal value.- Returns:
- The goal value
-
score
int score()
Gets the score value.- Returns:
- The score value
-
set
Optional<Instant> set(int score)
Adds the target score value, the score cannot exceed the goal value (goal()) or be under zero. The achieved time will be returned if the goal is met.- Parameters:
score- The score to set- Returns:
- The achieving time, if achieved
-
add
Optional<Instant> add(int score)
Adds the target score value, the score cannot exceed the goal value (goal()). The achieved time will be returned if the goal is met.- Parameters:
score- The score to add- Returns:
- The achieving time, if achieved
-
-