This release introduces two new features and some bug fixes!
- Added the `onChange` config attribute ([#10](https://github.com/xpple/BetterConfig/pull/10)). You can now register a function that is called whenever a specific config is updated. For example:
```java
@Config(onChange = "onChange")
public static List<String> exampleOnChange = new ArrayList<>(List.of("xpple, earthcomputer"));
private static void onChange(List<String> oldValue, List<String> newValue) {
LOGGER.info("exampleOnChange was updated | old: {}, new: {}", oldValue, newValue);
}
```
- Added global change hook ([#11](https://github.com/xpple/BetterConfig/pull/11)). This allows you to register a global function that is called whenever _any_ config is updated. For example:
```java
new ModConfigBuilder<>("<mod id>", Configs.class)
.registerGlobalChangeHook(event -> BetterConfigCommon.LOGGER.info("{} was updated | old: {}, new: {}", event.config(), event.oldValue(), event.newValue()))
.build();
```
- Added Tatar translations ([#8](https://github.com/xpple/BetterConfig/pull/8) by Amirhan-Taipovjan-Greatest-I)
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }