Interface Advancement
- All Superinterfaces:
ComponentLike,DataPackSerializable,DataSerializable,Keyed,ResourceKeyed
An advancement.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Advancement.Builderbuilder()Creates a newAdvancement.Builderto createAdvancements.children()Gets all the childrenAdvancements.Gets all theAdvancementCriterionthat should be achieved before this advancement is unlocked.Gets theDisplayInfoof this advancement, if present.parent()Gets the parentAdvancement, if present.Gets theComponentlines that would be used to display a toast notification.tree()Gets theAdvancementTreethis advancement is located in, will only be present if the root advancement was used to create aAdvancementTree.Methods inherited from interface net.kyori.adventure.text.ComponentLike
asComponentMethods inherited from interface org.spongepowered.api.datapack.DataPackSerializable
typeMethods inherited from interface org.spongepowered.api.data.persistence.DataSerializable
contentVersion, toContainerMethods inherited from interface org.spongepowered.api.ResourceKeyed
key
-
Method Details
-
builder
Creates a newAdvancement.Builderto createAdvancements.- Returns:
- The new builder
-
tree
Optional<AdvancementTree> tree()Gets theAdvancementTreethis advancement is located in, will only be present if the root advancement was used to create aAdvancementTree.- Returns:
- The advancement tree
-
children
Collection<Advancement> children()Gets all the childrenAdvancements.- Returns:
- The children advancements
-
criterion
AdvancementCriterion criterion()Gets all theAdvancementCriterionthat should be achieved before this advancement is unlocked.AdvancementCriterion.empty()will be returned if no criterion was assigned.This
AdvancementCriterioncan be a AND or OR operation that contains multiple possibleAdvancementCriterions.- Returns:
- The criterion
-
parent
Optional<Advancement> parent()Gets the parentAdvancement, if present.- Returns:
- The parent advancement, if present
-
displayInfo
Optional<DisplayInfo> displayInfo()Gets theDisplayInfoof this advancement, if present.- Returns:
- The display info, if present
-
toToastText
Gets theComponentlines that would be used to display a toast notification.- Returns:
- The text lines
-