- Clone this repository or download zip
- Change apiVersion in gradle.properties to the version or commit you want (see jitpack)
- Rename anything named "example"
- The load() and unload() methods are called when the client is loaded and unloaded
- To use the addon, put it in
.minecraft/mods/
alongside Samsara
- Create a class that extends Module
- Use
FeatureManager.(modules / widgets).add(FeatureClass())
to register it
@Register(0) val aValue = Value("Name", true)
@Register(1) val anotherValue = Value("DifferentName", 1.0, min = 0.0, max = 5.0)
@EventHandler
fun onEvent(event: ExampleEvent) {
// do stuff
}
Make sure to call EventHandler.register(ClassWithEventHandler())
Modules and Widgets are automatically registered and unregistered in onEnable() and onDisable()