Package wtf.choco.veinminer.config
Class VeinMiningConfig.Builder
java.lang.Object
wtf.choco.veinminer.config.VeinMiningConfig.Builder
- Enclosing class:
- VeinMiningConfig
A builder for a
VeinMiningConfig
.-
Method Summary
Modifier and TypeMethodDescription@NotNull VeinMiningConfig
build()
Build and return theVeinMiningConfig
.@NotNull VeinMiningConfig.Builder
Clear all disabled worlds (if any were disabled previously).@NotNull VeinMiningConfig.Builder
cost
(double cost) Set the cost of vein mining.@NotNull VeinMiningConfig.Builder
disableWorld
(@NotNull String worldName) Disable the world with the given name.@NotNull VeinMiningConfig.Builder
disableWorlds
(@NotNull Iterable<String> worldNames) Disable multiple worlds with the given names.@NotNull VeinMiningConfig.Builder
maxVeinSize
(int maxVeinSize) Set the maximum vein size.@NotNull VeinMiningConfig.Builder
repairFriendly
(boolean repairFriendly) Set whether or not this configuration is repair friendly.@NotNull VeinMiningConfig.Builder
undisableWorld
(@NotNull String worldName) Undisable the world with the given name (if it was disabled previously).
-
Method Details
-
repairFriendly
Set whether or not this configuration is repair friendly.- Parameters:
repairFriendly
- the value- Returns:
- this instance. Allows for chained method calls
- See Also:
-
maxVeinSize
Set the maximum vein size.- Parameters:
maxVeinSize
- the value- Returns:
- this instance. Allows for chained method calls
- See Also:
-
cost
Set the cost of vein mining.- Parameters:
cost
- the cost- Returns:
- this instance. Allows for chained method calls
- See Also:
-
disableWorld
Disable the world with the given name.- Parameters:
worldName
- the name of the world to disable- Returns:
- this instance. Allows for chained method calls
- See Also:
-
disableWorlds
@NotNull public @NotNull VeinMiningConfig.Builder disableWorlds(@NotNull @NotNull Iterable<String> worldNames) Disable multiple worlds with the given names.- Parameters:
worldNames
- an iterable containing all world names to disable- Returns:
- this instance. Allows for chained method calls
- See Also:
-
undisableWorld
@NotNull public @NotNull VeinMiningConfig.Builder undisableWorld(@NotNull @NotNull String worldName) Undisable the world with the given name (if it was disabled previously).- Parameters:
worldName
- the name of the world to undisable- Returns:
- this instance. Allows for chained method calls
- See Also:
-
clearDisabledWorlds
Clear all disabled worlds (if any were disabled previously).- Returns:
- this instance. Allows for chained method calls
- See Also:
-
build
Build and return theVeinMiningConfig
.- Returns:
- the config
-