Henry Boles e4beb3d606 Init
2021-09-30 15:24:38 -07:00

25 lines
747 B
Java

package top.penowl.quidproquo;
import com.avaje.ebean.LogLevel;
import com.sun.tools.sjavac.Log.Level;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
public class Altar {
public static Boolean CheckAltar(Location location) {
Boolean gold_block = location.getBlock().getType() == Material.GOLD_BLOCK;
int iron_blocks = 0;
for (int x = -1; x < 2; x++) {
for (int z = -1; z < 2; z++) {
Location ironLocation = location.clone().add(x, -1, z);
if (ironLocation.getBlock().getType() == Material.IRON_BLOCK) {
iron_blocks++;
}
}
}
return (gold_block && iron_blocks == 9);
}
}