Entrypoint
This is your main point of entry, it is called once when your Extension is loaded.
Info
You are required to register modules, classes with events, and so on.
Requirements
-
Create a class called Main.java.
-
Add a public static method that returns void.
-
Name it init.
Example
public class Main {
public static void init() {
// Register here
}
}
What do you need to register?
Tip
You should init your own stuff here as well.
-
Modules
Example
Extension.registerModule(new ExampleModule());
-
Events
Example
// Not needed for module classes - that is done automatically
Extension.registerEvent(new ExampleHandler());
-
Commands
Example
CommandHandler.register(new ExampleCommand());
-
Slot Background
Example
SlotManager.register(new ExampleSlot());
-
Name Icons
Example
IconManager.register(new ExampleIcon());