public class NukkitPlugin
extends cn.nukkit.plugin.PluginBase
implements com.djrapitops.plugin.APFPlugin
Modifier and Type | Field and Description |
---|---|
protected com.djrapitops.plugin.logging.debug.CombineDebugLogger |
debugLogger |
protected com.djrapitops.plugin.logging.console.PluginLogger |
logger |
protected boolean |
reloading |
protected com.djrapitops.plugin.task.RunnableFactory |
runnableFactory |
protected com.djrapitops.plugin.benchmarking.Timings |
timings |
Constructor and Description |
---|
NukkitPlugin()
Standard constructor that initializes the plugin with the default DebugLogger.
|
NukkitPlugin(com.djrapitops.plugin.logging.debug.CombineDebugLogger debugLogger)
Constructor for defining a debug logger at creation time.
|
Modifier and Type | Method and Description |
---|---|
com.djrapitops.plugin.logging.debug.DebugLogger |
getDebugLogger() |
com.djrapitops.plugin.logging.error.ErrorHandler |
getErrorHandler()
Deprecated.
|
com.djrapitops.plugin.logging.console.PluginLogger |
getPluginLogger() |
com.djrapitops.plugin.task.RunnableFactory |
getRunnableFactory() |
com.djrapitops.plugin.benchmarking.Timings |
getTimings() |
java.lang.String |
getVersion() |
protected boolean |
isNewVersionAvailable(java.lang.String versionStringUrl) |
boolean |
isReloading() |
boolean |
onCommand(cn.nukkit.command.CommandSender sender,
cn.nukkit.command.Command command,
java.lang.String label,
java.lang.String[] args) |
void |
onDisable() |
void |
onReload() |
void |
registerCommand(java.lang.String name,
com.djrapitops.plugin.command.CommandNode command) |
void |
registerListener(cn.nukkit.event.Listener... listeners) |
void |
reloadPlugin(boolean full) |
void |
setDebugLoggers(com.djrapitops.plugin.logging.debug.DebugLogger... loggers) |
void |
setErrorHandlers(com.djrapitops.plugin.logging.error.ErrorHandler... errorHandlers) |
void |
setReloading(boolean reloading) |
getCommand, getConfig, getDataFolder, getDescription, getFile, getFullName, getLogger, getName, getPluginLoader, getResource, getServer, init, isDisabled, isEnabled, isInitialized, onEnable, onLoad, reloadConfig, saveConfig, saveDefaultConfig, saveResource, saveResource, saveResource, setEnabled, setEnabled
protected final com.djrapitops.plugin.logging.debug.CombineDebugLogger debugLogger
protected final com.djrapitops.plugin.benchmarking.Timings timings
protected final com.djrapitops.plugin.task.RunnableFactory runnableFactory
protected com.djrapitops.plugin.logging.console.PluginLogger logger
protected boolean reloading
public NukkitPlugin()
public NukkitPlugin(com.djrapitops.plugin.logging.debug.CombineDebugLogger debugLogger)
debugLogger
- debug logger to use.public void onDisable()
onDisable
in interface cn.nukkit.plugin.Plugin
onDisable
in interface com.djrapitops.plugin.IPlugin
onDisable
in class cn.nukkit.plugin.PluginBase
public void registerListener(cn.nukkit.event.Listener... listeners)
public void registerCommand(java.lang.String name, com.djrapitops.plugin.command.CommandNode command)
registerCommand
in interface com.djrapitops.plugin.IPlugin
public boolean onCommand(cn.nukkit.command.CommandSender sender, cn.nukkit.command.Command command, java.lang.String label, java.lang.String[] args)
onCommand
in interface cn.nukkit.command.CommandExecutor
onCommand
in class cn.nukkit.plugin.PluginBase
protected boolean isNewVersionAvailable(java.lang.String versionStringUrl) throws java.io.IOException
java.io.IOException
public void reloadPlugin(boolean full)
reloadPlugin
in interface com.djrapitops.plugin.IPlugin
public boolean isReloading()
isReloading
in interface com.djrapitops.plugin.IPlugin
public void setReloading(boolean reloading)
setReloading
in interface com.djrapitops.plugin.APFPlugin
public com.djrapitops.plugin.task.RunnableFactory getRunnableFactory()
getRunnableFactory
in interface com.djrapitops.plugin.IPlugin
public com.djrapitops.plugin.logging.console.PluginLogger getPluginLogger()
getPluginLogger
in interface com.djrapitops.plugin.IPlugin
public com.djrapitops.plugin.logging.debug.DebugLogger getDebugLogger()
getDebugLogger
in interface com.djrapitops.plugin.IPlugin
@Deprecated public com.djrapitops.plugin.logging.error.ErrorHandler getErrorHandler()
getErrorHandler
in interface com.djrapitops.plugin.IPlugin
public com.djrapitops.plugin.benchmarking.Timings getTimings()
getTimings
in interface com.djrapitops.plugin.IPlugin
public void setDebugLoggers(com.djrapitops.plugin.logging.debug.DebugLogger... loggers)
setDebugLoggers
in interface com.djrapitops.plugin.IPlugin
public void setErrorHandlers(com.djrapitops.plugin.logging.error.ErrorHandler... errorHandlers)
setErrorHandlers
in interface com.djrapitops.plugin.IPlugin
public void onReload()
onReload
in interface com.djrapitops.plugin.IPlugin
public java.lang.String getVersion()
getVersion
in interface com.djrapitops.plugin.IPlugin