Class ACRPlugin

java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
tk.airshipcraft.commonlib.CommonLib
tk.airshipcraft.commonlib.ACRPlugin
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.event.Listener, org.bukkit.plugin.Plugin

public abstract class ACRPlugin extends CommonLib
Abstract class representing a CommonLib plugin. This class provides the framework for enabling and disabling plugins that extend CommonLib.
Since:
2023-05-31
Version:
1.0.0
Author:
Locutusque, notzune
  • Field Summary

    Fields inherited from class org.bukkit.plugin.java.JavaPlugin

    logger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Disables all subclasses of ACRPlugin.
    static void
    Enables all subclasses of ACRPlugin.
    abstract void
    Abstract method to be implemented by subclasses.
    abstract void
    Abstract method to be implemented by subclasses.
    abstract void
    Abstract method to be implemented by subclasses.
    abstract void
    Abstract method to be implemented by subclasses.

    Methods inherited from class org.bukkit.plugin.java.JavaPlugin

    getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getPluginMeta, getProvidingPlugin, getResource, getServer, getTextResource, init, init, isEnabled, isNaggable, onCommand, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString

    Methods inherited from class org.bukkit.plugin.PluginBase

    equals, getName, hashCode

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.bukkit.plugin.Plugin

    getComponentLogger, getLog4JLogger, getSLF4JLogger
  • Constructor Details

    • ACRPlugin

      public ACRPlugin()
  • Method Details

    • enableSubclasses

      public static void enableSubclasses()
      Enables all subclasses of ACRPlugin. This method uses reflection to find and initialize subclasses, and then calls their onPluginEnable method.
    • disableSubclasses

      public static void disableSubclasses()
      Disables all subclasses of ACRPlugin. This method calls the onPluginDisable method of each subclass.
    • onPluginEnable

      public abstract void onPluginEnable()
      Abstract method to be implemented by subclasses. This method is called when the plugin is enabled.
    • onPluginDisable

      public abstract void onPluginDisable()
      Abstract method to be implemented by subclasses. This method is called when the plugin is disabled.
    • registerCommands

      public abstract void registerCommands()
      Abstract method to be implemented by subclasses. This method is called when the plugin is enabled.
    • registerEvents

      public abstract void registerEvents()
      Abstract method to be implemented by subclasses. This method is called when the plugin is disabled.