Interface AdvancementProgress
public interface AdvancementProgress
The individual status of an advancement for a player. This class is not
reference safe as the underlying advancement may be reloaded.
- Since:
- 1.12
-
Method Summary
Modifier and TypeMethodDescriptionbooleanawardCriteria(@NotNull String criteria) Mark the specified criteria as awarded at the current time.@NotNull AdvancementThe advancement this progress is concerning.@NotNull Collection<String> Gets the criteria which have been awarded.@Nullable DategetDateAwarded(@NotNull String criteria) Get the date the specified criteria was awarded.@NotNull Collection<String> Get the criteria which have not been awarded.booleanisDone()Check if all criteria for this advancement have been met.booleanrevokeCriteria(@NotNull String criteria) Mark the specified criteria as uncompleted.
-
Method Details
-
getAdvancement
The advancement this progress is concerning.- Returns:
- the relevant advancement
- Since:
- 1.12
-
isDone
boolean isDone()Check if all criteria for this advancement have been met.- Returns:
- true if this advancement is done
- Since:
- 1.12
-
awardCriteria
Mark the specified criteria as awarded at the current time.- Parameters:
criteria- the criteria to mark- Returns:
- true if awarded, false if criteria does not exist or already awarded.
- Since:
- 1.12
-
revokeCriteria
Mark the specified criteria as uncompleted.- Parameters:
criteria- the criteria to mark- Returns:
- true if removed, false if criteria does not exist or not awarded
- Since:
- 1.12
-
getDateAwarded
-
getRemainingCriteria
Get the criteria which have not been awarded.- Returns:
- unmodifiable copy of criteria remaining
- Since:
- 1.12
-
getAwardedCriteria
Gets the criteria which have been awarded.- Returns:
- unmodifiable copy of criteria awarded
- Since:
- 1.12
-