Enum Class GrantMode
- All Implemented Interfaces:
Serializable
,Comparable<GrantMode>
,Constable
Specifies how criteria for a custom advancement should be granted.
Used by AdvancementAPI
to determine whether to grant all criteria at once when the
target value is reached, or to grant criteria one by one as the player progresses.
- Since:
- 0.2.0
- Version:
- 0.3.2
- Author:
- lambdaphoenix
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAll remaining criteria for the advancement are granted at once when the progress reaches or exceeds the target value.Only the next uncompleted criterion is granted each time the progress reaches the target value. -
Method Summary
-
Enum Constant Details
-
ALL_AT_ONCE
All remaining criteria for the advancement are granted at once when the progress reaches or exceeds the target value.Use this mode for advancements that should be completed in a single step.
-
STEP_BY_STEP
Only the next uncompleted criterion is granted each time the progress reaches the target value. Progress is then reset for the next step.Use this mode for advancements that should be completed over multiple steps, with a progress bar shown in the advancements tab.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-