diff --git a/src/main/java/com/sk89q/worldedit/regions/Polygonal2DRegion.java b/src/main/java/com/sk89q/worldedit/regions/Polygonal2DRegion.java index f3a4cbca0..ddacd73a8 100644 --- a/src/main/java/com/sk89q/worldedit/regions/Polygonal2DRegion.java +++ b/src/main/java/com/sk89q/worldedit/regions/Polygonal2DRegion.java @@ -165,6 +165,15 @@ public class Polygonal2DRegion implements Region { recalculate(); } + /** + * Get the minimum Y. + * + * @return min y + */ + public int getMininumY() { + return minY; + } + /** * Set the minimum Y. * @@ -177,7 +186,16 @@ public class Polygonal2DRegion implements Region { } /** - * Se the maximum Y. + * Get the maximum Y. + * + * @return max y + */ + public int getMaximumY() { + return maxY; + } + + /** + * Set the maximum Y. * * @param y */ @@ -597,12 +615,4 @@ public class Polygonal2DRegion implements Region { public void setWorld(LocalWorld world) { this.world = world; } - - public int getMinY() { - return minY; - } - - public int getMaxY() { - return maxY; - } } diff --git a/src/main/java/com/sk89q/worldedit/regions/Polygonal2DRegionSelector.java b/src/main/java/com/sk89q/worldedit/regions/Polygonal2DRegionSelector.java index ebeba8b21..5d2b981bb 100644 --- a/src/main/java/com/sk89q/worldedit/regions/Polygonal2DRegionSelector.java +++ b/src/main/java/com/sk89q/worldedit/regions/Polygonal2DRegionSelector.java @@ -124,18 +124,18 @@ public class Polygonal2DRegionSelector implements RegionSelector, CUIRegion { session.dispatchCUIEvent(player, new SelectionShapeEvent(getTypeID())); session.dispatchCUIEvent(player, new SelectionPoint2DEvent(0, pos, getArea())); - session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.getMinY(), region.getMaxY())); + session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.getMininumY(), region.getMaximumY())); } public void explainSecondarySelection(LocalPlayer player, LocalSession session, Vector pos) { player.print("Added point #" + region.size() + " at " + pos + "."); session.dispatchCUIEvent(player, new SelectionPoint2DEvent(region.size() - 1, pos, getArea())); - session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.getMinY(), region.getMaxY())); + session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.getMininumY(), region.getMaximumY())); } public void explainRegionAdjust(LocalPlayer player, LocalSession session) { - session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.getMinY(), region.getMaxY())); + session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.getMininumY(), region.getMaximumY())); } public BlockVector getPrimaryPosition() throws IncompleteRegionException { @@ -194,7 +194,7 @@ public class Polygonal2DRegionSelector implements RegionSelector, CUIRegion { session.dispatchCUIEvent(player, new SelectionPoint2DEvent(id, points.get(id), getArea())); } - session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.getMinY(), region.getMaxY())); + session.dispatchCUIEvent(player, new SelectionMinMaxEvent(region.getMininumY(), region.getMaximumY())); } public void describeLegacyCUI(LocalSession session, LocalPlayer player) {