Config Buttons

Config buttons are fields that will show up as buttons in the UI these are useful if you want to make an editor for certain values.

To add a button to the UI you first must annotate a field with the @ConfigButton annotation, the annotation requires 1 thing the text of the button. Optionally you can add a translation key for the button title, this title is used like titles for other config options where it is disabled on the left hand side of the row.

Example

@ConfigButton(text = "Click Me!")
public static final Runnable button = () -> {};

Note

Config buttons have certain restrictions they must follow. The following are the restrictions.

  • The field must have the public access modifier

  • The field must be static

  • The field must be final

  • The field must be Runnable type

Last updated