Class MultiversePlugin
- java.lang.Object
-
- org.bukkit.plugin.PluginBase
-
- org.bukkit.plugin.java.JavaPlugin
-
- com.onarandombox.MultiverseCore.api.MultiversePlugin
-
- All Implemented Interfaces:
LoggablePlugin
,MVPlugin
,org.bukkit.command.CommandExecutor
,org.bukkit.command.TabCompleter
,org.bukkit.command.TabExecutor
,org.bukkit.plugin.Plugin
public abstract class MultiversePlugin extends org.bukkit.plugin.java.JavaPlugin implements MVPlugin
Make things easier for MV-Plugins!
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
logTag
Prefix for standard log entrys.
-
Constructor Summary
Constructors Constructor Description MultiversePlugin()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
dumpVersionInfo(java.lang.String buffer)
Adds This plugin's version information to the buffer and returns the new string.protected java.lang.String
getAuthors()
Parse the Authors Array into a readable String with ',' and 'and'.MultiverseCore
getCore()
Gets the reference to MultiverseCore.void
log(java.util.logging.Level level, java.lang.String msg)
Logs a message at the specified level.boolean
onCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, java.lang.String label, java.lang.String[] args)
void
onEnable()
Note: You can't override this, useonPluginEnable()
instead!protected abstract void
onPluginEnable()
Called when the plugin is enabled.protected abstract void
registerCommands(com.pneumaticraft.commandhandler.CommandHandler handler)
You can register commands here.void
setCore(MultiverseCore core)
Sets the reference to MultiverseCore.protected void
setDebugLogTag(java.lang.String tag)
Sets the debug log-tag.-
Methods inherited from class org.bukkit.plugin.java.JavaPlugin
getClassLoader, getCommand, getConfig, getDataFolder, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onDisable, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.onarandombox.MultiverseCore.api.LoggablePlugin
getServer
-
Methods inherited from interface com.onarandombox.MultiverseCore.api.MVPlugin
getProtocolVersion
-
-
-
-
Method Detail
-
onEnable
public final void onEnable()
Note: You can't override this, useonPluginEnable()
instead!- Specified by:
onEnable
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onEnable
in classorg.bukkit.plugin.java.JavaPlugin
- See Also:
onPluginEnable()
-
getAuthors
protected java.lang.String getAuthors()
Parse the Authors Array into a readable String with ',' and 'and'.- Returns:
- The readable authors-
String
-
onPluginEnable
protected abstract void onPluginEnable()
Called when the plugin is enabled.- See Also:
onEnable()
-
registerCommands
protected abstract void registerCommands(com.pneumaticraft.commandhandler.CommandHandler handler)
You can register commands here.- Parameters:
handler
- The CommandHandler.
-
onCommand
public boolean onCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command command, java.lang.String label, java.lang.String[] args)
- Specified by:
onCommand
in interfaceorg.bukkit.command.CommandExecutor
- Overrides:
onCommand
in classorg.bukkit.plugin.java.JavaPlugin
-
log
public void log(java.util.logging.Level level, java.lang.String msg)
Description copied from interface:LoggablePlugin
Logs a message at the specified level.- Specified by:
log
in interfaceLoggablePlugin
- Parameters:
level
- The Log-Level
.msg
- The message to log.
-
setDebugLogTag
protected final void setDebugLogTag(java.lang.String tag)
Sets the debug log-tag.- Parameters:
tag
- The new tag.
-
dumpVersionInfo
public final java.lang.String dumpVersionInfo(java.lang.String buffer)
Description copied from interface:MVPlugin
Adds This plugin's version information to the buffer and returns the new string.- Specified by:
dumpVersionInfo
in interfaceMVPlugin
- Parameters:
buffer
- The string that contains Core and all other MV plugins' versions.- Returns:
- A modified buffer that contains this MVPlugin's version information.
-
getCore
public final MultiverseCore getCore()
Description copied from interface:MVPlugin
Gets the reference to MultiverseCore.- Specified by:
getCore
in interfaceMVPlugin
- Returns:
- A valid
com.onarandombox.MultiverseCore
.
-
setCore
public final void setCore(MultiverseCore core)
Description copied from interface:MVPlugin
Sets the reference to MultiverseCore.- Specified by:
setCore
in interfaceMVPlugin
- Parameters:
core
- A validcom.onarandombox.MultiverseCore
.
-
-