addToggle

@NotNull
abstract fun addToggle(@NotNull widgetId: @NotNull String, @NotNull label: @NotNull McTextComponent, @Nullable tooltip: @Nullable McTextComponent, defaultValue: Boolean): @NotNull BooleanConfigEntry

Adds a toggle (boolean) widget to the addon's configuration.

Return

A configuration entry associated with the created widget.

Parameters

widgetId

Unique identifier for the widget.

label

The label displayed for the toggle.

tooltip

The tooltip displayed for the toggle.

defaultValue

The default value of the toggle.