58c420d35f9118560f384d2a58489092c4b15c31
fix classloading for mod menu by moving registration methods to OmegaConfigGui class, fix versioning
fix classloading for mod menu by moving registration methods to OmegaConfigGui class, fix versioning
ΩConfig
The last config library you will ever use.
ΩConfig is a hyper-minimal config library based on Auto Config. It aims to achieve the following goals:
- Be lightweight (<10 KB) for JIJ usage
- Exceedingly simple design & API for developers
- Intuition and usability for players
The following is an example of a simple ΩConfig setup:
public class TestConfig implements Config {
@Comment(value = "Hello!")
boolean value = false;
@Override
public String getFileName() {
return "test-config";
}
}
public class MyModInitializer {
public static final TestConfig CONFIG = OmegaConfig.register(TestConfig.class);
@Override
public void onInitialize() {
System.out.printf("Config value: %s%n", CONFIG.value);
}
}
Extra API Utilities
ΩConfig provides several utility methods for developers.
save() - saves a modified configuration instance to disk
MyModInitializer.CONFIG.value=false;
MyModInitializer.CONFIG.save(); // writes the new value to disk
License
ΩConfig is available under Public Domain. You are encouraged to utilize the code in this repository in any way you wish.