Class 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.
    • 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, use onPluginEnable() 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 org.bukkit.plugin.PluginBase

        equals, getName, hashCode
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • logTag

        protected java.lang.String logTag
        Prefix for standard log entrys.
    • Constructor Detail

      • MultiversePlugin

        public MultiversePlugin()
    • Method Detail

      • onEnable

        public final void onEnable()
        Note: You can't override this, use onPluginEnable() instead!
        Specified by:
        onEnable in interface org.bukkit.plugin.Plugin
        Overrides:
        onEnable in class org.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 interface org.bukkit.command.CommandExecutor
        Overrides:
        onCommand in class org.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 interface LoggablePlugin
        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 interface MVPlugin
        Parameters:
        buffer - The string that contains Core and all other MV plugins' versions.
        Returns:
        A modified buffer that contains this MVPlugin's version information.