Class VeinMinerServer

java.lang.Object
wtf.choco.veinminer.VeinMinerServer
All Implemented Interfaces:
VeinMiner

public final class VeinMinerServer extends Object implements VeinMiner
A class holding VeinMiner's core common functionality.
  • Method Details

    • onLoad

      public void onLoad(@NotNull @NotNull ServerPlatform platform)
      Called when the server plugin loads.
      Parameters:
      platform - the server platform implementation to set
    • onEnable

      public void onEnable()
      Called when the server plugin enables.
    • onDisable

      public void onDisable()
      Called when the server plugin disables.
    • setDefaultActivationStrategy

      public void setDefaultActivationStrategy(@NotNull @NotNull ActivationStrategy activationStrategy)
      Set the default ActivationStrategy to use for players that have not explicitly set one.
      Parameters:
      activationStrategy - the activation strategy to set
    • getDefaultActivationStrategy

      @NotNull public @NotNull ActivationStrategy getDefaultActivationStrategy()
      Get the default ActivationStrategy to use for players that have not explicitly set one.
      Returns:
      the default activation strategy
    • setDefaultVeinMiningPattern

      @NotNull public void setDefaultVeinMiningPattern(@NotNull @NotNull VeinMiningPattern pattern)
      Set the default VeinMiningPattern to use for players that have not explicitly set one.
      Parameters:
      pattern - the pattern to set
    • getDefaultVeinMiningPattern

      @NotNull public @NotNull VeinMiningPattern getDefaultVeinMiningPattern()
      Get the default VeinMiningPattern to use for players that have not explicitly set one.
      Returns:
      the default pattern
    • getVeinMinerManager

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

      @NotNull public @NotNull VeinMinerPlayerManager getPlayerManager()
      Returns:
      the player manager
    • getToolCategoryRegistry

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

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

      public void setPersistentDataStorage(@NotNull @NotNull PersistentDataStorage persistentDataStorage)
      Set the PersistentDataStorage for the server.
      Parameters:
      persistentDataStorage - the persistent data storage to set
    • getPersistentDataStorage

      @NotNull public @NotNull PersistentDataStorage getPersistentDataStorage()
      Get the PersistentDataStorage for the server.
      Returns:
      the persistent data storage
    • setEconomy

      public void setEconomy(@NotNull @NotNull SimpleEconomy economy)
      Set the SimpleEconomy implementation.
      Parameters:
      economy - the economy
    • getEconomy

      @NotNull public @NotNull SimpleEconomy getEconomy()
      Get the SimpleEconomy.
      Returns:
      the economy
    • getPlatform

      @NotNull public @NotNull ServerPlatform getPlatform()
      Get the ServerPlatform instance.
      Returns:
      the platform instance
    • getVersion

      @NotNull public @NotNull String getVersion()
      Description copied from interface: VeinMiner
      Get the version of VeinMiner (not to be confused with the protocol version).
      Specified by:
      getVersion in interface VeinMiner
      Returns:
      the version
    • isServer

      public boolean isServer()
      Description copied from interface: VeinMiner
      Check whether or not VeinMiner is running on the server.
      Specified by:
      isServer in interface VeinMiner
      Returns:
      true if running on the server, false if running on the client
      See Also:
    • createClientConfig

      @NotNull public @NotNull ClientConfig createClientConfig(@NotNull @NotNull PlatformPlayer player)
      Create a VeinMiningConfig with values supplied by the plugin's config.
      Parameters:
      player - the player for whom to create the config
      Returns:
      the default client config
    • reloadVeinMinerManagerConfig

      public void reloadVeinMinerManagerConfig()
      Reload the VeinMinerManager's values from config into memory.
    • reloadToolCategoryRegistryConfig

      public void reloadToolCategoryRegistryConfig()
      Reload the ToolCategoryRegistry's values from config into memory.
    • getInstance

      @NotNull public static @NotNull VeinMinerServer getInstance()
      Get the VeinMinerServer instance.
      Returns:
      the vein miner instance