Class WMPlugin

java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
net.winmister332.libs.WMPlugin
All Implemented Interfaces:
org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

public abstract class WMPlugin extends org.bukkit.plugin.java.JavaPlugin
This is the base class for all WinMister plugins.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    This event is triggered when the plugin is disabled.
    This event is triggered when the plugin is enabled.
    This event is triggered on every first initial load of the plugin.
    This event is triggered when the plugin is loaded.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    The main CTOR for the WMPlugin class.
    protected
    WMPlugin(boolean debug, File logFile, VerbosityLevel level)
    The main CTOR for the WMPlugin class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the CommandInvoker of the WM Commands.
    Gets the WMLogger instance associated with this plugin/class.
    boolean
    onCommand(@NotNull org.bukkit.command.CommandSender sender, @NotNull org.bukkit.command.Command command, @NotNull String label, @NotNull String[] args)
     
    void
     
    void
     
    void
     

    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, 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
  • Field Details

    • enabledEvent

      public Event<XEventArgs<Boolean>> enabledEvent
      This event is triggered when the plugin is enabled.
    • disabledEvent

      public Event<XEventArgs<Boolean>> disabledEvent
      This event is triggered when the plugin is disabled.
    • loadEvent

      public Event<EventArgs> loadEvent
      This event is triggered when the plugin is loaded.
    • firstLoad

      public Event<EventArgs> firstLoad
      This event is triggered on every first initial load of the plugin. This event is ran before the load event, and this event does NOT run during reload.
  • Constructor Details

    • WMPlugin

      protected WMPlugin(boolean debug, File logFile, VerbosityLevel level)
      The main CTOR for the WMPlugin class.
      Parameters:
      debug - If true, it'll allow the debug state in the WMLogger.
      logFile - if not null, a log file at the specified location will be created and written to.
      level - Denotes the verbosity level of the WMLogger.
    • WMPlugin

      public WMPlugin()
      The main CTOR for the WMPlugin class.
  • Method Details

    • getWmLogger

      public Logger getWmLogger()
      Gets the WMLogger instance associated with this plugin/class.
      Returns:
      The @see Logger instance associated with this plugin.
    • getInvoker

      public CommandInvoker getInvoker()
      Gets the CommandInvoker of the WM Commands.
      Returns:
      The @see CommandInvoker class.
    • onCommand

      public boolean onCommand(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull org.bukkit.command.Command command, @NotNull @NotNull String label, @NotNull @NotNull String[] args)
      Specified by:
      onCommand in interface org.bukkit.command.CommandExecutor
      Overrides:
      onCommand in class org.bukkit.plugin.java.JavaPlugin
    • onDisable

      public void onDisable()
      Specified by:
      onDisable in interface org.bukkit.plugin.Plugin
      Overrides:
      onDisable in class org.bukkit.plugin.java.JavaPlugin
    • onLoad

      public void onLoad()
      Specified by:
      onLoad in interface org.bukkit.plugin.Plugin
      Overrides:
      onLoad in class org.bukkit.plugin.java.JavaPlugin
    • onEnable

      public void onEnable()
      Specified by:
      onEnable in interface org.bukkit.plugin.Plugin
      Overrides:
      onEnable in class org.bukkit.plugin.java.JavaPlugin