Interface Advancement
- All Superinterfaces:
ComponentLike
,DataPackSerializable
,DefaultedRegistryValue
An advancement.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Advancement.Builder
builder()
Creates a newAdvancement.Builder
to create anAdvancement
.Gets all theAdvancementCriterion
that should be achieved before this advancement is unlocked.Gets theDisplayInfo
of this advancement, if present.parent()
Gets the parentAdvancement
, if present.Gets theComponent
lines that would be used to display a toast notification.Methods inherited from interface net.kyori.adventure.text.ComponentLike
asComponent
Methods inherited from interface org.spongepowered.api.datapack.DataPackSerializable
toDataPack
Methods inherited from interface org.spongepowered.api.registry.DefaultedRegistryValue
asDefaultedReference, findKey, key
-
Method Details
-
builder
Creates a newAdvancement.Builder
to create anAdvancement
.- Returns:
- The new builder
-
criterion
AdvancementCriterion criterion()Gets all theAdvancementCriterion
that should be achieved before this advancement is unlocked.AdvancementCriterion.empty()
will be returned if no criterion was assigned.This
AdvancementCriterion
can be a AND or OR operation that contains multiple possibleAdvancementCriterion
s.- Returns:
- The criterion
-
parent
Optional<ResourceKey> parent()Gets the parentAdvancement
, if present.- Returns:
- The parent advancement, if present
-
displayInfo
Optional<DisplayInfo> displayInfo()Gets theDisplayInfo
of this advancement, if present.- Returns:
- The display info, if present
-
toToastText
Gets theComponent
lines that would be used to display a toast notification.- Returns:
- The text lines
-