Interface AdvancementProgress
-
- All Superinterfaces:
Progressable
public interface AdvancementProgress extends Progressable
Represents the progress of aAdvancement
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Advancement
advancement()
Gets theAdvancement
.java.util.Optional<CriterionProgress>
get(AdvancementCriterion criterion)
Gets theCriterionProgress
for the givenAdvancementCriterion
if the specified criterion is present on theAdvancement
.java.util.Optional<ScoreCriterionProgress>
get(ScoreAdvancementCriterion criterion)
Gets theScoreCriterionProgress
for the givenScoreAdvancementCriterion
if the specified criterion is present on theAdvancement
.CriterionProgress
require(AdvancementCriterion criterion)
Gets theCriterionProgress
for the givenAdvancementCriterion
.ScoreCriterionProgress
require(ScoreAdvancementCriterion criterion)
Gets theScoreCriterionProgress
for the givenScoreAdvancementCriterion
.-
Methods inherited from interface org.spongepowered.api.advancement.Progressable
achieved, get, grant, revoke
-
-
-
-
Method Detail
-
advancement
Advancement advancement()
Gets theAdvancement
.- Returns:
- The advancement
-
get
java.util.Optional<CriterionProgress> get(AdvancementCriterion criterion)
Gets theCriterionProgress
for the givenAdvancementCriterion
if the specified criterion is present on theAdvancement
.For AND and OR criteria will wrapped
CriterionProgress
be provided that will interact with theCriterionProgress
s for every childAdvancementCriterion
s.- Parameters:
criterion
- The criterion- Returns:
- The criterion progress
-
get
java.util.Optional<ScoreCriterionProgress> get(ScoreAdvancementCriterion criterion)
Gets theScoreCriterionProgress
for the givenScoreAdvancementCriterion
if the specified criterion is present on theAdvancement
.- Parameters:
criterion
- The score criterion- Returns:
- The score criterion progress
-
require
CriterionProgress require(AdvancementCriterion criterion)
Gets theCriterionProgress
for the givenAdvancementCriterion
.For AND and OR criteria will wrapped
CriterionProgress
be provided that will interact with theCriterionProgress
s for every childAdvancementCriterion
s.- Parameters:
criterion
- The criterion- Returns:
- The criterion progress
-
require
ScoreCriterionProgress require(ScoreAdvancementCriterion criterion)
Gets theScoreCriterionProgress
for the givenScoreAdvancementCriterion
.- Parameters:
criterion
- The score criterion- Returns:
- The score criterion progress
-
-