Interface ListenerComponent

All Superinterfaces:
org.bukkit.event.Listener, Loadable

public interface ListenerComponent extends Loadable, org.bukkit.event.Listener
A component that registers and unregisters itself as a Listener. Plugin listeners should extend this class and register their events.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Called when the component is disabled
    default void
    Called when the component is enabled
    default org.bukkit.plugin.java.JavaPlugin
    Get the plugin that this listener is associated with.

    Methods inherited from interface io.github.projectunified.minelib.plugin.base.Loadable

    load
  • Method Details

    • getPlugin

      default org.bukkit.plugin.java.JavaPlugin getPlugin()
      Get the plugin that this listener is associated with. You may override this method to return a different plugin, in case that the listener is not in the same plugin.
      Returns:
      the plugin
    • enable

      default void enable()
      Description copied from interface: Loadable
      Called when the component is enabled
      Specified by:
      enable in interface Loadable
    • disable

      default void disable()
      Description copied from interface: Loadable
      Called when the component is disabled
      Specified by:
      disable in interface Loadable