Contribute settings
This API lets a Fabric client mod add options to the ElytraF5 & more settings screen. Your category, translated labels, optional icon and controls are rendered in the host mod’s visual style, while your mod keeps ownership of the setting values.
Before you start
- ElytraF5 must be installed in the game environment.
- Register settings from a Fabric
ClientModInitializer. - Compile your integration against the ElytraF5 client API.
- Your mod is responsible for storing and persisting its own values.
Quick start
Register one category during client initialization. Minimal toggle example:
class ExampleClient : ClientModInitializer {
private var enabled = true
override fun onInitializeClient() {
ElytraF5SettingsApi.registerCategory(
SettingsCategory(
id = "examplemod:visuals",
title = Component.translatable("examplemod.settings.visuals"),
options = listOf(
BooleanSettingOption(
id = "enabled",
title = Component.translatable("examplemod.settings.enabled"),
description = Component.translatable("examplemod.settings.enabled.tooltip"),
currentValue = { enabled },
onChanged = { enabled = it }
)
)
)
)
}
}When the player opens ElytraF5 settings, the category is listed in the sidebar. The control reads currentValue() and invokes onChanged after a change.
Available controls
BooleanSettingOption
ON/OFF cycle button. The host provides localized ON/OFF labels.
ChoiceSettingOption
Cycles through stable choice IDs and displays your own translatable labels.
ActionSettingOption
Runs an action, such as opening a dedicated configuration screen.
Continue with the complete API reference and the Gradle, persistence, translations and screen examples.
Register a category once during client startup. Registering the same category ID again throws a validation error.