Class VeinMinerPlugin

All Implemented Interfaces:
CommandExecutor, TabCompleter, TabExecutor, Plugin

public final class VeinMinerPlugin extends JavaPlugin
The VeinMiner JavaPlugin class.
  • Constructor Details

    • VeinMinerPlugin

      public VeinMinerPlugin()
  • Method Details

    • onLoad

      public void onLoad()
      Specified by:
      onLoad in interface Plugin
      Overrides:
      onLoad in class JavaPlugin
    • onEnable

      public void onEnable()
      Specified by:
      onEnable in interface Plugin
      Overrides:
      onEnable in class JavaPlugin
    • onDisable

      public void onDisable()
      Specified by:
      onDisable in interface Plugin
      Overrides:
      onDisable in class JavaPlugin
    • getInstance

      @NotNull public static @NotNull VeinMinerPlugin getInstance()
      Get an instance of the main VeinMiner class (for VeinMiner API).
      Returns:
      an instance of the VeinMiner class
    • getVeinMinerManager

      @NotNull public @NotNull VeinMinerManager getVeinMinerManager()
      Returns:
      the vein miner manager
    • getToolCategoryRegistry

      @NotNull public @NotNull ToolCategoryRegistry getToolCategoryRegistry()
      Returns:
      the tool category registry
    • getPatternRegistry

      @NotNull public @NotNull PatternRegistry getPatternRegistry()
      Returns:
      the pattern registry
    • getPlayerManager

      @NotNull public @NotNull VeinMinerPlayerManager getPlayerManager()
      Get the VeinMinerPlayerManager instance.
      Returns:
      the player manager
    • getDefaultVeinMiningPattern

      @NotNull public @NotNull VeinMiningPattern getDefaultVeinMiningPattern()
      Get the default VeinMiningPattern to be used for new players.
      Returns:
      the default vein mining pattern
    • getCategoriesConfig

      @NotNull public @NotNull ConfigWrapper getCategoriesConfig()
      Get an instance of the categories configuration file.
      Returns:
      the categories config
    • registerAntiCheatHook

      public boolean registerAntiCheatHook(@NotNull @NotNull AntiCheatHook hook)
      Register an anti cheat hook to VeinMiner. Hooks should be registered for all anti cheat plugins as to support VeinMining and not false-flag players with fast-break.
      Parameters:
      hook - the hook to register
      Returns:
      true if registered, false if unsupported
    • getAnticheatHooks

      @NotNull public @NotNull List<AntiCheatHook> getAnticheatHooks()
      Get an immutable list of all anti cheat hooks.
      Returns:
      all anti cheat hooks
    • key

      @NotNull public static @NotNull NamespacedKey key(String key)
      Get a NamespacedKey with VeinMiner's namespace.
      Parameters:
      key - the key
      Returns:
      a VeinMiner namespaced key