Package net.winmister332.libs
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
FieldsModifier and TypeFieldDescriptionThis 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
ConstructorsModifierConstructorDescriptionWMPlugin()The main CTOR for the WMPlugin class.protectedWMPlugin(boolean debug, File logFile, VerbosityLevel level) The main CTOR for the WMPlugin class. -
Method Summary
Modifier and TypeMethodDescriptionGets the CommandInvoker of the WM Commands.Gets the WMLogger instance associated with this plugin/class.booleanonCommand(@NotNull org.bukkit.command.CommandSender sender, @NotNull org.bukkit.command.Command command, @NotNull String label, @NotNull String[] args) voidvoidonEnable()voidonLoad()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, toStringMethods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bukkit.plugin.Plugin
getComponentLogger, getLog4JLogger, getSLF4JLogger
-
Field Details
-
enabledEvent
This event is triggered when the plugin is enabled. -
disabledEvent
This event is triggered when the plugin is disabled. -
loadEvent
This event is triggered when the plugin is loaded. -
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
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
Gets the WMLogger instance associated with this plugin/class.- Returns:
- The @see Logger instance associated with this plugin.
-
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:
onCommandin interfaceorg.bukkit.command.CommandExecutor- Overrides:
onCommandin classorg.bukkit.plugin.java.JavaPlugin
-
onDisable
public void onDisable()- Specified by:
onDisablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onDisablein classorg.bukkit.plugin.java.JavaPlugin
-
onLoad
public void onLoad()- Specified by:
onLoadin interfaceorg.bukkit.plugin.Plugin- Overrides:
onLoadin classorg.bukkit.plugin.java.JavaPlugin
-
onEnable
public void onEnable()- Specified by:
onEnablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onEnablein classorg.bukkit.plugin.java.JavaPlugin
-