From 1ab17c1ab62b84c3bfe8fb8b48183164a3680f16 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Mon, 10 May 2021 15:42:22 +0200 Subject: [PATCH] Added overloaded-alternative-method searchForMaterial --- .../ruekov/ruakij/LinkedBeaconTeleporters/Function.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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)){