Interface Progressable
-
- All Known Subinterfaces:
AdvancementProgress
,CriterionProgress
,ScoreCriterionProgress
public interface Progressable
Represents the status that is achieved or is in the process of being achieved.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
achieved()
Gets whether thisProgressable
is achieved.java.util.Optional<java.time.Instant>
get()
Gets the time that theProgressable
was achieved if present.java.time.Instant
grant()
Grants thisProgressable
, if achieved before that time will be returned.java.util.Optional<java.time.Instant>
revoke()
Revokes theProgressable
status.
-
-
-
Method Detail
-
achieved
default boolean achieved()
Gets whether thisProgressable
is achieved.- Returns:
- Is achieved
-
get
java.util.Optional<java.time.Instant> get()
Gets the time that theProgressable
was achieved if present.- Returns:
- The achieving time, if present
-
grant
java.time.Instant grant()
Grants thisProgressable
, if achieved before that time will be returned.- Returns:
- The achieving time
-
revoke
java.util.Optional<java.time.Instant> revoke()
Revokes theProgressable
status. The time that theProgressable
was achieved before will be returned if present.- Returns:
- The previous achieving time, if present
-
-