Config Object Entries

Config objects are similar to a config but instead of everything having to be static these classes are instances and all fields are instance fields instead of static. These are useful if you have the same data but for different parts ie. 3 items that have the same config values but need to be separated.

Config objects must be annotated with the @ConfigObject annotation to signify that the object can be used for a object entry. Unlike categories and configs ConfigObjects can only contain entries, no buttons, or categories are allowed on objects, additionally they have 1 restriction and that is that they cannot contain entries for other Config Objects.

Note

Config objects like classes have certain restrictions they must follow. The following are restrictions that a config object must follow:

  • The class must be annotated with the @ConfigObject annotation

  • The class must have the public access modifier

  • The class must be static if it is an inner class of another

  • The class must not be an enum, interface, annotation, or a record.

  • All config entry fields must be not static

  • All config entry fields must follow all other stipulations given to them in the Config Entries page.

Last updated