diff --git a/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/Function.java b/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/Function.java index 6c98aaa..dcca8a3 100644 --- a/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/Function.java +++ b/src/main/java/eu/ruekov/ruakij/LinkedBeaconTeleporters/Function.java @@ -7,10 +7,7 @@ import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.util.Vector; -import java.util.Arrays; -import java.util.InvalidPropertiesFormatException; -import java.util.List; -import java.util.Random; +import java.util.*; public class Function { public static String serialiseBlockLocation(Location loc){ @@ -129,6 +126,9 @@ public class Function { Material.STONE_SLAB, Material.WARPED_SLAB ); + public static Block searchForMaterial(Location startLoc, Vector searchDirection, Material searchMaterial){ + return searchForMaterial(startLoc, searchDirection, searchMaterial, new ArrayList<>()); + } public static Block searchForMaterial(Location startLoc, Vector searchDirection, Material searchMaterial, List ignoreMaterials){ Location loc = new Location(startLoc.getWorld(), startLoc.getBlockX(), startLoc.getBlockY(), startLoc.getBlockZ()); for(int i=0; loc.getBlockY()>=0 && loc.getBlockY()<=255; loc.add(searchDirection)){