Interface ScoreCriterionProgress

All Superinterfaces:
CriterionProgress, Progressable

public interface ScoreCriterionProgress extends CriterionProgress
Represents the progress of a ScoreAdvancementCriterion.
  • Method Details Link icon

    • criterion Link icon

      Description copied from interface: CriterionProgress
      Specified by:
      criterion in interface CriterionProgress
      Returns:
      The criterion
    • goal Link icon

      default int goal()
      Gets the goal value.
      Returns:
      The goal value
    • score Link icon

      int score()
      Gets the score value.
      Returns:
      The score value
    • set Link icon

      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 Link icon

      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
    • remove Link icon

      Optional<Instant> remove(int score)
      Removes the target score value, the score cannot go under zero. The achieved time will be returned if the goal is met before.
      Parameters:
      score - The score to remove
      Returns:
      The old achieving time, if achieved before