Class VeinMiningConfig

java.lang.Object
wtf.choco.veinminer.config.VeinMiningConfig
All Implemented Interfaces:
Cloneable

public final class VeinMiningConfig extends Object implements Cloneable
Represents VeinMiner's configuration for vein mining operations.
  • Constructor Details

  • Method Details

    • isRepairFriendly

      public boolean isRepairFriendly()
      Check whether or not repair friendly is enabled.

      If true, VeinMiner will stop breaking blocks when a tool reaches 1 durability as to avoid breaking it.

      Returns:
      true if repair friendly, false otherwise
    • getMaxVeinSize

      public int getMaxVeinSize()
      Get the maximum vein size.

      The returned integer is the maximum amount of blocks VeinMiner will mine for any given vein of blocks.

      Returns:
      the maximum vein size
    • getCost

      public double getCost()
      Get the cost of using VeinMiner.

      The returned double is the amount of money that will be taken from the player if an economy is installed on the server.

      Returns:
      the cost
    • isDisabledWorld

      public boolean isDisabledWorld(@NotNull @NotNull String worldName)
      Check whether or not the world with the given (case-sensitive) name is disabled.

      Disabled worlds will disallow VeinMiner from being used at all.

      Parameters:
      worldName - the name of the world to check
      Returns:
      true if disabled, false otherwise
    • getDisabledWorlds

      @NotNull public @NotNull @UnmodifiableView Set<String> getDisabledWorlds()
      Get an unmodifiable Set of all disabled worlds.
      Returns:
      all disabled world names
    • edit

      @NotNull public @NotNull VeinMiningConfig edit(@NotNull @NotNull Consumer<VeinMiningConfig.Builder> editor)
      Edit this VeinMiningConfig with the given Consumer and return a new instance of the config with all edited values. This operation is immutable and will not modify this instance of the config.
      Parameters:
      editor - the editor
      Returns:
      the newly edited VeinMinerConfig instance
    • builder

      @NotNull public static VeinMiningConfig.Builder builder()
      Get a new builder for a VeinMiningConfig.
      Returns:
      a builder
      See Also:
    • clone

      @NotNull public @NotNull VeinMiningConfig clone()
      Overrides:
      clone in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object