Package net.mcreator.plugin
Class JavaPlugin
java.lang.Object
net.mcreator.plugin.JavaPlugin
- All Implemented Interfaces:
Comparable<JavaPlugin>
Extend this object to define custom plugin.
A fully qualified name to this class name needs to be specified as "javaplugin" field in plugin.json file
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T extends MCREvent>
voidaddListener
(Class<T> eventType, MCREventListener<T> listener) Call this method to add new event listener to the pluginint
-
Field Details
-
plugin
-
-
Constructor Details
-
JavaPlugin
-
-
Method Details
-
getPlugin
- Returns:
- Definition of the plugin this Java plugin belongs to
-
addListener
Call this method to add new event listener to the plugin- Parameters:
eventType
- Class of the event typelistener
- Listener for the given event
-
compareTo
- Specified by:
compareTo
in interfaceComparable<JavaPlugin>
-