diff --git a/src/main/java/org/kapelle/multiblock/BlockComponent.java b/src/main/java/org/kapelle/multiblock/BlockComponent.java index 8882131..6a6faae 100644 --- a/src/main/java/org/kapelle/multiblock/BlockComponent.java +++ b/src/main/java/org/kapelle/multiblock/BlockComponent.java @@ -5,6 +5,7 @@ import org.bukkit.Material; import org.bukkit.block.Block; import java.util.Collections; +import java.util.HashSet; import java.util.Set; interface CheckFunction { @@ -36,6 +37,12 @@ public class BlockComponent { this.customCheckFunction = customCheckFunction; } + public BlockComponent(Material type){ + this.blocks = new HashSet<>(); + this.blocks.add(type); + this.mode = BlockComponentMode.SET; + } + public boolean isValidBlock(Location location){ if(this.mode == BlockComponentMode.CUSTOM){ return this.customCheckFunction.apply(location);