Class AdvancementProgress
java.lang.Object
eu.endercentral.crazy_advancements.advancement.progress.AdvancementProgress
Represents the progress a Player has made for a specific Advancement
- Author:
- Axel
-
Constructor Summary
ConstructorDescriptionAdvancementProgress
(String[][] requirements) Constructor for Creating a Progress InstanceAdvancementProgress
(Map<String, net.minecraft.advancements.Criterion<?>> criteria, String[][] requirements) Deprecated, for removal: This API element is subject to removal in a future version.Use AdvancementProgress(String[][] requirements) instead -
Method Summary
Modifier and TypeMethodDescriptionGets the awarded Criteriaint
Gets the Criteria Progressnet.minecraft.advancements.CriterionProgress
getCriterionProgress
(String name) Gets the Criterion Progress Instance by it's namelong
Gets the timestamp for the last update or -1 if it has not been updated yetnet.minecraft.advancements.AdvancementProgress
Gets the nms progress instanceGets the remaining Criteriagrant()
Grants the Advancement, does not update for the playergrantCriteria
(String... criteria) Grants Criteria, does not update for the playerboolean
isDone()
Checks whether the Progress is Donerevoke()
Revokes the Advancemnt, does not update for the playerrevokeCriteria
(String... criteria) Revokes Criteria, does not update for the playersetCriteriaProgress
(int number) Sets Criteria, does not update for the playervoid
Sets the timestamp for the last update to the current system time
-
Constructor Details
-
AdvancementProgress
@Deprecated(forRemoval=true, since="2.1.15") public AdvancementProgress(Map<String, net.minecraft.advancements.Criterion<?>> criteria, String[][] requirements) Deprecated, for removal: This API element is subject to removal in a future version.Use AdvancementProgress(String[][] requirements) insteadConstructor for Creating a Progress Instance- Parameters:
criteria
- The Criteriarequirements
- The Requirements
-
AdvancementProgress
Constructor for Creating a Progress Instance- Parameters:
criteria
- The Criteriarequirements
- The Requirements
-
-
Method Details
-
grant
Grants the Advancement, does not update for the player- Returns:
- The result of this oepration
-
revoke
Revokes the Advancemnt, does not update for the player- Returns:
- The result of this operation
-
grantCriteria
Grants Criteria, does not update for the player- Parameters:
criteria
- The Criteria to grant- Returns:
- The result of this operation
-
revokeCriteria
Revokes Criteria, does not update for the player- Parameters:
criteria
- The Criteria to revoke- Returns:
- The result of this operation
-
setCriteriaProgress
Sets Criteria, does not update for the player- Parameters:
number
- The Criteria to set- Returns:
- The result of this operation
-
getRemainingCriteria
Gets the remaining Criteria- Returns:
- The remaining Criteria
-
getAwardedCriteria
Gets the awarded Criteria- Returns:
- The awarded Criteria
-
getCriteriaProgress
public int getCriteriaProgress()Gets the Criteria Progress- Returns:
- The Criteria Progress
-
getCriterionProgress
Gets the Criterion Progress Instance by it's name- Parameters:
name
- The Criterion Name- Returns:
- The CriterionProgress
-
isDone
public boolean isDone()Checks whether the Progress is Done- Returns:
- Whether the Progress is Done
-
getNmsProgress
public net.minecraft.advancements.AdvancementProgress getNmsProgress()Gets the nms progress instance- Returns:
- The nms progress instance
-
getLastUpdate
public long getLastUpdate()Gets the timestamp for the last update or -1 if it has not been updated yet- Returns:
- The timestamp in milliseconds or -1 if it has not been updated yet
-
setLastUpdate
public void setLastUpdate()Sets the timestamp for the last update to the current system time
-