Record Class AdvancementDefinition

java.lang.Object
java.lang.Record
ke.ric.api.advancement.AdvancementDefinition

public record AdvancementDefinition(String id, String title, String description, org.bukkit.Material icon, String headTextureHash, String itemId, boolean hidden, boolean announce, AdvancementDefinition.Frame frame) extends Record
Immutable, owner-scoped addon advancement triggered by eating one custom item.
  • Constructor Details

    • AdvancementDefinition

      public AdvancementDefinition(String id, String title, String description, org.bukkit.Material icon, String headTextureHash, String itemId, boolean hidden, boolean announce, AdvancementDefinition.Frame frame)
      Creates an instance of a AdvancementDefinition record class.
      Parameters:
      id - the value for the id record component
      title - the value for the title record component
      description - the value for the description record component
      icon - the value for the icon record component
      headTextureHash - the value for the headTextureHash record component
      itemId - the value for the itemId record component
      hidden - the value for the hidden record component
      announce - the value for the announce record component
      frame - the value for the frame record component
  • Method Details

    • hiddenChallenge

      public static AdvancementDefinition hiddenChallenge(String id, String title, String description, String itemId, String headTextureHash)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • title

      public String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • icon

      public org.bukkit.Material icon()
      Returns the value of the icon record component.
      Returns:
      the value of the icon record component
    • headTextureHash

      public String headTextureHash()
      Returns the value of the headTextureHash record component.
      Returns:
      the value of the headTextureHash record component
    • itemId

      public String itemId()
      Returns the value of the itemId record component.
      Returns:
      the value of the itemId record component
    • hidden

      public boolean hidden()
      Returns the value of the hidden record component.
      Returns:
      the value of the hidden record component
    • announce

      public boolean announce()
      Returns the value of the announce record component.
      Returns:
      the value of the announce record component
    • frame

      Returns the value of the frame record component.
      Returns:
      the value of the frame record component