Enum Class AdvancementDisplay.Frame

java.lang.Object
java.lang.Enum<AdvancementDisplay.Frame>
io.papermc.paper.advancement.AdvancementDisplay.Frame
All Implemented Interfaces:
Serializable, Comparable<AdvancementDisplay.Frame>, Constable, Translatable
Enclosing interface:
AdvancementDisplay

public static enum AdvancementDisplay.Frame extends Enum<AdvancementDisplay.Frame> implements Translatable
Defines how the AdvancementDisplay.icon() appears in the advancements screen and the color used with the advancement name.
  • Enum Constant Details

    • CHALLENGE

      public static final AdvancementDisplay.Frame CHALLENGE
      "Challenge complete" advancement.

      The client will play the ui.toast.challenge_complete sound when the challenge is completed and the toast is shown.

    • GOAL

      public static final AdvancementDisplay.Frame GOAL
      "Goal reached" advancement.
    • TASK

      public static final AdvancementDisplay.Frame TASK
      "Advancement made" advancement.
  • Field Details

  • Method Details

    • values

      public static AdvancementDisplay.Frame[] 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

      public static AdvancementDisplay.Frame valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • color

      public TextColor color()
      Gets the TextColor used for the advancement name.
      Returns:
      the text color
    • translationKey

      public String translationKey()
      Gets the translation key used when an advancement is completed.

      This is the first line of the toast displayed by the client.

      Specified by:
      translationKey in interface Translatable
      Returns:
      the toast message key