From e57ac75a507f8be47d84aa88af4cb8f64632d8c8 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Fri, 7 Sep 2018 06:58:09 +1000 Subject: [PATCH] fix typo --- .../java/com/sk89q/worldedit/command/UtilityCommands.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java b/core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java index f165a2ff..d9eeb7d8 100644 --- a/core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java +++ b/core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java @@ -167,7 +167,7 @@ public class UtilityCommands extends MethodCommands { @Command( aliases = {"/heightmapinterface"}, - desc = "Generate the heightmap interface: https://github.com/boy0001/HeightMap", + desc = "Generate the heightmap interface: https://github.com/boy0001/HeightMap" ) public void heightmapInterface(FawePlayer player, @Optional("100") int min, @Optional("200") int max) throws IOException { player.sendMessage("Please wait while we generate the minified heightmaps."); @@ -193,7 +193,7 @@ public class UtilityCommands extends MethodCommands { if (name.startsWith(File.separator)) name = name.replaceFirst(java.util.regex.Pattern.quote(File.separator), ""); BufferedImage img = MainUtil.readImage(file); BufferedImage minImg = ImageUtil.getScaledInstance(img, min, min, RenderingHints.VALUE_INTERPOLATION_BILINEAR, true); - BufferedImage maxImg = ImageUtil.getScaledInstance(img, max, max, RenderingHints.VALUE_INTERPOLATION_BILINEAR, true); + BufferedImage maxImg = max == -1 ? img : ImageUtil.getScaledInstance(img, max, max, RenderingHints.VALUE_INTERPOLATION_BILINEAR, true); player.sendMessage("Writing " + name); File minFile = new File(minImages, name); File maxFile = new File(maxImages, name);