package de._82grfl1bif.KPI_Visualizer.structures; import org.bukkit.Material; import java.awt.Point; public class Building extends Structure{ private final int height; public Building(int width, int height, Material material){ //Buildings are Square -> no depth this.width.x = width; this.width.y = width; this.height = height; this.material = material; if(this.width.x < 3){ throw new IllegalArgumentException("keine Gebäude kleiner 3 wegen 2 Gehweg"); } } public Building(Point width, int height, Material material){ //Buildings are Square -> no depth this.width = width; this.height = height; this.material = material; if(this.width.x < 3 || this.width.y < 3){ throw new IllegalArgumentException("keine Gebäude kleiner 3 wegen 2 Gehweg"); } } public int getHeight() { return this.height; } }