From 1021c6f2b01cbbf39ff077fca0826915be6c3b02 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Thu, 20 Dec 2018 20:25:21 +0000 Subject: [PATCH] Use Math.min and Math.max --- .../plotsquared/bukkit/util/block/GenChunk.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/block/GenChunk.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/block/GenChunk.java index eb68c77f7..09ef37ebe 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/block/GenChunk.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/block/GenChunk.java @@ -80,12 +80,12 @@ public class GenChunk extends ScopedLocalBlockQueue { Arrays.fill(data, start, end, block); } } - int minx = pos1.getX() < pos2.getX() ? pos1.getX() : pos2.getX(); - int miny = pos1.getY() < pos2.getY() ? pos1.getY() : pos2.getY(); - int minz = pos1.getZ() < pos2.getZ() ? pos1.getZ() : pos2.getZ(); - int maxx = pos1.getX() > pos2.getX() ? pos1.getX() : pos2.getX(); - int maxy = pos1.getY() > pos2.getY() ? pos1.getY() : pos2.getY(); - int maxz = pos1.getZ() > pos2.getZ() ? pos1.getZ() : pos2.getZ(); + int minx = Math.min(pos1.getX(), pos2.getX()); + int miny = Math.min(pos1.getY(), pos2.getY()); + int minz = Math.min(pos1.getZ(), pos2.getZ()); + int maxx = Math.max(pos1.getX(), pos2.getX()); + int maxy = Math.max(pos1.getY(), pos2.getY()); + int maxz = Math.max(pos1.getZ(), pos2.getZ()); cd.setRegion(minx, miny, minz, maxx, maxy, maxz, block.to(Material.class)); }