Class JavaPlugin

java.lang.Object
net.mcreator.plugin.JavaPlugin

public abstract class JavaPlugin extends Object
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 Details

    • plugin

      protected final Plugin plugin
  • Constructor Details

    • JavaPlugin

      public JavaPlugin(Plugin plugin)
  • Method Details

    • getPlugin

      public Plugin getPlugin()
      Returns:
      Definition of the plugin this Java plugin belongs to
    • addListener

      public <T extends MCREvent> void addListener(Class<T> eventType, MCREventListener<T> listener)
      Call this method to add new event listener to the plugin
      Parameters:
      eventType - Class of the event type
      listener - Listener for the given event