https://github.com/axolotlclient/axolotlclient-config
The Config lib of AxolotlClient
https://github.com/axolotlclient/axolotlclient-config
Last synced: 11 months ago
JSON representation
The Config lib of AxolotlClient
- Host: GitHub
- URL: https://github.com/axolotlclient/axolotlclient-config
- Owner: AxolotlClient
- License: other
- Created: 2022-09-20T17:40:42.000Z (over 3 years ago)
- Default Branch: multiversion
- Last Pushed: 2025-06-15T14:14:25.000Z (12 months ago)
- Last Synced: 2025-06-15T15:36:36.264Z (12 months ago)
- Language: Java
- Size: 2.96 MB
- Stars: 5
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AxolotlClient-config
The Config lib of AxolotlClient
## Using it in your project
### Include it in your mod
```groovy
repositories {
maven {
url "https://moehreag.duckdns.org/maven/releases"
}
}
dependencies {
// replace VERSION with the latest version available,
// check at https://moehreag.duckdns.org/maven/#/releases/io/github/axolotlclient/AxolotlClient-config
modImplementation include('io.github.axolotlclient:AxolotlClient-config:VERSION')
}
```
Beta versions
```groovy
repositories {
maven {
url "https://moehreag.duckdns.org/maven/snapshots"
}
}
dependencies {
// replace VERSION with the latest version available,
// check at https://moehreag.duckdns.org/maven/#/snapshots/io/github/axolotlclient/AxolotlClient-config
modImplementation include('io.github.axolotlclient:AxolotlClient-config:VERSION')
}
```
### Registering a config
```java
AxolotlClientConfig.register(ConfigManager manager);
```
### Creating your own options
You'll need to implement the `Option` interface. The `OptionBase` class may be helpful
for many cases. Note though that widgets are specific for each Option/Category implementation meaning
that if you create your own option you will also have to create a widget for it. This does not apply to
options extending the provided types though.
If you want an option to not be saved to the config file, return `null` in `toSerializedValue`