Fzzy Config

Config Annotations

Fzzy Config provides an extensive suite of Annotations for spicing up a config. All Fzzy Config annotations are documented over at the official documentation as well as explained here:

Annotation Documentation

Annotations in Fzzy Config are split into two broad categories; Toml Annotations for flavoring and commenting the .toml files themselves, and Config Annotations for adding functionality to the configs themselves in various ways. The Toml Annotations won't be covered here, you can read their documentation at the link above, and the original documentation at the TomlKt Docs

Config Annotations

Augment the functionality of your configs with these annotations. The currently available list of annotations is:

  • @ClientModifiable - Fields marked with this will be editable by clients regardless of permission level
  • @WithPerms - Defines the permission level needed for clients to edit server settings marked with this
  • @WithCustomPerms and @AdminLevel - Defines permission levels in a LuckPerms/Forge Permissions API style, with string-based "nodes"; optionally falling back to vanilla permission level.
  • @NonSync - Defines a field as client-only. Editable regardless of perms, and won't sync to/from servers
  • @Version - Sets the version of a config class, used for version-managed updates
  • @RequiresRestart - (Deprecated as of 0.4.0) Fields or classes marked with this will prompt a user restart after syncing
  • @RequiresAction - (As of 0.4.0) This will note that the user will need to take a particular action if they change the affected setting. Applies to fields and classes.
  • @ConvertFrom - Specifies an old config file from a previous lib to scrape and convert into a Fzzy Config toml
  • @IgnoreVisibility - Classes marked with this annotation can have fields/properties with lower visibility than public
  • @Translation - Defines a custom lang file prefix for a setting or whole class of settings
  • Toml Annotations - A series of annotations for decorating and modifying config .toml files directly.