Class UpgradeSchema.Field

java.lang.Object
de.Keyle.MyPet.api.skill.UpgradeSchema.Field
Enclosing class:
UpgradeSchema

public static final class UpgradeSchema.Field extends Object
One upgrade field: name (the exact JSON key the parser reads), type, and display hints.
  • Method Details

    • getName

      public String getName()
      The field's name as it appears in the upgrade JSON.
      Returns:
      the field name
    • getType

      public UpgradeSchema.FieldType getType()
      What kind of value this field holds.
      Returns:
      the field type
    • getLabel

      public String getLabel()
      Literal English label; used as the "en" fallback when no translation key exists.
      Returns:
      the editor label, or null to derive one from the name
    • getSuffix

      public String getSuffix()
      Unit shown after the value in the editor, such as a percent sign.
      Returns:
      the suffix, or null for none
    • isCumulative

      public boolean isCumulative()
      Whether values from successive levels add up rather than replace each other.
      Returns:
      true if the field accumulates
    • getEnumValues

      public List<String> getEnumValues()
      The permitted names, for an UpgradeSchema.FieldType.ENUM field.
      Returns:
      the permitted values, or an empty list for other field types
    • getChildren

      public List<UpgradeSchema.Field> getChildren()
      Returns:
      the child fields, or an empty list for other field types