-
Notifications
You must be signed in to change notification settings - Fork 0
Creating a new module
To create a new module, create a class that extends me.dustin.feature.mod.core.Feature
To mark the module, use the annotation Manifest in me.dustin.feature.mod.core.Feature
By default, only two values are needed in the annotation.
-
Category: The category of the module -
Description: The description of the module
There are also optional values you can set
-
Key: The keybind of the module. use GLFW.GLFW_KEY_key_name. -
Name: The name of the module. If not set, it will be automatically set to the name of the class -
Enabled: Whether or not the module is enabled by default
Your code should look something like this
import me.dustin.jex.feature.mod.core.Feature;
import org.lwjgl.glfw.GLFW;
@Feature.Manifest(name = "Example", category = Feature.Category.MISC, description = "Example", key = GLFW.GLFW_KEY_K)
public class ExampleFeature extends Feature {
}
Jex Options are very simple and easy to use. To create one, use the me.dustin.jex.feature.option.annotate.Op above a field. Use the ExampleFeature for some examples
To create an option inside of another option use me.dustin.jex.feature.option.annotate.ChildOp and set the parent value to the name of the parent
To add events, you use the me.dustin.events.core.annotate.EventPointer above a me.dustin.events.core.EventListener field, using the event class as the type parameter. You can find all events here. See the ExampleFeature for examples.