diff --git a/src/main/java/com/sk89q/worldguard/protection/regions/ProtectedPolygonalRegion.java b/src/main/java/com/sk89q/worldguard/protection/regions/ProtectedPolygonalRegion.java index d2db8a07..61d5a277 100644 --- a/src/main/java/com/sk89q/worldguard/protection/regions/ProtectedPolygonalRegion.java +++ b/src/main/java/com/sk89q/worldguard/protection/regions/ProtectedPolygonalRegion.java @@ -164,7 +164,8 @@ public String getTypeName() { @Override public int volume() { int volume = 0; - int numPoints = points.size(); + // TODO: Fix this + /*int numPoints = points.size(); if (numPoints < 3) { return 0; } @@ -172,7 +173,7 @@ public int volume() { double area = 0; int xa, z1, z2; - for (int i = 0; i <= numPoints - 1; i++) { + for (int i = 0; i < numPoints; i++) { xa = points.get(i).getBlockX(); //za = points.get(i).getBlockZ(); @@ -195,7 +196,7 @@ public int volume() { area = area + (xa * (points.get(1).getBlockZ() - points.get(numPoints - 1).getBlockZ())); - volume = (Math.abs(maxY - minY) + 1) * (int) Math.ceil((Math.abs(area) / 2)); + volume = (Math.abs(maxY - minY) + 1) * (int) Math.ceil((Math.abs(area) / 2));*/ return volume; }