Skip to content

Making a Configuration Class

zerocool edited this page Feb 7, 2026 · 4 revisions

@ConfigProperty

Any class can be used as a configuration class, as long as it contains at least one field annotated with the @ConfigProperty annotation. This annotation marks a field as a part of the configuration, and will be stored/loaded appropriately.

@Comment

The @Comment annotation can be used to add a comment above the property in the configuration file. To add a comment, add the line @Comment(comment = "COMMENT") filling the string with your actual comment.

Supported Types

Any types that are not listed here will be ignored
Every field MUST have a default value

  • byte/Byte
  • short/Short
  • int/Integer
  • long/Long
  • float/Float
  • double/Double
  • boolean/Boolean
  • String

Registry Types

These are types which need to perform a lookup into a Minecraft Registry. The currently implemented ones are:

  • Item
  • Block
  • StatusEffect

ArrayLists

You can have an ArrayList of any of these types. The array list does not need any elements to function, but must at least be creates with new ArrayList<>()

Clone this wiki locally