Class Hyperverse

  • All Implemented Interfaces:
    org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin, HyperverseAPI

    public final class Hyperverse
    extends org.bukkit.plugin.java.JavaPlugin
    implements HyperverseAPI
    Plugin main class Represents a Java plugin
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int BSTATS_ID  
    • Constructor Summary

      Constructors 
      Constructor Description
      Hyperverse()  
    • Method Summary

      Modifier and Type Method Description
      static HyperverseAPI getApi()
      Get the (singleton) implementation of HyperverseAPI
      @NotNull HyperConfiguration getConfiguration()
      Get the HyperConfiguration implementation used throughout Hyperverse
      @NotNull HyperDatabase getDatabase()
      Get the HyperDatabase implementation used throughout Hyperverse
      @NotNull com.google.inject.Injector getInjector()
      Get the Injector instance used throughout Hyperverse.
      @NotNull WorldManager getWorldManager()
      Get the WorldManager implementation used throughout Hyperverse
      void onDisable()
      Called when this plugin is disabled
      void onEnable()
      Called when this plugin is enabled
      void onLoad()
      Called after a plugin is loaded but before it has been enabled.
      boolean reloadConfiguration​(@Nullable org.bukkit.command.CommandSender invoker)
      Reload the configuration and messages for hyperverse.
      • 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, onCommand, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString
      • Methods inherited from class org.bukkit.plugin.PluginBase

        equals, getName, hashCode
    • Constructor Detail

      • Hyperverse

        public Hyperverse()
    • Method Detail

      • onLoad

        public void onLoad()
        Description copied from interface: org.bukkit.plugin.Plugin
        Called after a plugin is loaded but before it has been enabled.

        When multiple plugins are loaded, the onLoad() for all plugins is called before any onEnable() is called.

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

        public void onEnable()
        Description copied from interface: org.bukkit.plugin.Plugin
        Called when this plugin is enabled
        Specified by:
        onEnable in interface org.bukkit.plugin.Plugin
        Overrides:
        onEnable in class org.bukkit.plugin.java.JavaPlugin
      • onDisable

        public void onDisable()
        Description copied from interface: org.bukkit.plugin.Plugin
        Called when this plugin is disabled
        Specified by:
        onDisable in interface org.bukkit.plugin.Plugin
        Overrides:
        onDisable in class org.bukkit.plugin.java.JavaPlugin
      • reloadConfiguration

        public boolean reloadConfiguration​(@Nullable
                                           @Nullable org.bukkit.command.CommandSender invoker)
        Reload the configuration and messages for hyperverse. If an invoker is supplied, this method will also send a user-friendly message.
        Parameters:
        invoker - An optional CommandSender who invoked the reload.
      • getInjector

        @NotNull
        public @NotNull com.google.inject.Injector getInjector()
        Description copied from interface: HyperverseAPI
        Get the Injector instance used throughout Hyperverse. This can be used to create new instances of various Hyperverse classes
        Specified by:
        getInjector in interface HyperverseAPI
        Returns:
        Injector instance.