Interface Advancement

All Superinterfaces:
Keyed, Keyed

public interface Advancement extends Keyed
Represents an advancement that may be awarded to a player. This class is not reference safe as the underlying advancement may be reloaded.
  • Method Details

    • getCriteria

      @NotNull @NotNull Collection<String> getCriteria()
      Get all the criteria present in this advancement.
      Returns:
      a unmodifiable copy of all criteria
    • getRequirements

      @NotNull @NotNull AdvancementRequirements getRequirements()
      Returns the requirements for this advancement.
      Returns:
      an AdvancementRequirements object.
    • getDisplay

      @Nullable AdvancementDisplay getDisplay()
      Get the display info of this advancement.

      Will be null when totally hidden, for example with crafting recipes.

      Returns:
      the display info
    • displayName

      @NotNull Component displayName()
      Gets the formatted display name for this display. This is part of the component that would be shown in chat when a player completes the advancement. Will return the same as AdvancementDisplay.displayName() when an AdvancementDisplay is present.
      Returns:
      the display name
      See Also:
    • getParent

      @Nullable @Nullable Advancement getParent()
      Gets the parent advancement, if any.
      Returns:
      the parent advancement
    • getChildren

      @NotNull @NotNull @Unmodifiable Collection<Advancement> getChildren()
      Gets all the direct children advancements.
      Returns:
      the children advancements
    • getRoot

      @NotNull @NotNull Advancement getRoot()
      Gets the root advancement of the tree this is located in.
      Returns:
      the root advancement