Package de.Keyle.MyPet.api.skill
Class UpgradeSchema.Field
java.lang.Object
de.Keyle.MyPet.api.skill.UpgradeSchema.Field
- Enclosing class:
UpgradeSchema
One upgrade field: name (the exact JSON key the parser reads), type, and display hints.
-
Method Summary
Modifier and TypeMethodDescriptionThe nested fields, for aUpgradeSchema.FieldType.GROUPorUpgradeSchema.FieldType.LISTfield.The permitted names, for anUpgradeSchema.FieldType.ENUMfield.getLabel()Literal English label; used as the "en" fallback when no translation key exists.getName()The field's name as it appears in the upgrade JSON.Unit shown after the value in the editor, such as a percent sign.getType()What kind of value this field holds.booleanWhether values from successive levels add up rather than replace each other.
-
Method Details
-
getName
The field's name as it appears in the upgrade JSON.- Returns:
- the field name
-
getType
What kind of value this field holds.- Returns:
- the field type
-
getLabel
Literal English label; used as the "en" fallback when no translation key exists.- Returns:
- the editor label, or
nullto derive one from the name
-
getSuffix
Unit shown after the value in the editor, such as a percent sign.- Returns:
- the suffix, or
nullfor none
-
isCumulative
public boolean isCumulative()Whether values from successive levels add up rather than replace each other.- Returns:
trueif the field accumulates
-
getEnumValues
The permitted names, for anUpgradeSchema.FieldType.ENUMfield.- Returns:
- the permitted values, or an empty list for other field types
-
getChildren
The nested fields, for aUpgradeSchema.FieldType.GROUPorUpgradeSchema.FieldType.LISTfield.- Returns:
- the child fields, or an empty list for other field types
-