From 68101d7a940284abb1a07f514a1c790001060606 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Thu, 21 Nov 2024 06:21:17 +0800 Subject: [PATCH] cleanup --- .../io/wdsj/imagepreviewer/command/ConstructTabCompleter.java | 2 +- src/main/java/io/wdsj/imagepreviewer/image/ImageLoader.java | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/io/wdsj/imagepreviewer/command/ConstructTabCompleter.java b/src/main/java/io/wdsj/imagepreviewer/command/ConstructTabCompleter.java index b296104..f6abe61 100644 --- a/src/main/java/io/wdsj/imagepreviewer/command/ConstructTabCompleter.java +++ b/src/main/java/io/wdsj/imagepreviewer/command/ConstructTabCompleter.java @@ -19,7 +19,7 @@ public List onTabComplete(@NotNull CommandSender sender, @NotNull Comman List tabComplete = new ArrayList<>(); if (sender.hasPermission(PermissionsEnum.RELOAD.getPermission()) && args[0].startsWith("r")) { tabComplete.add("reload"); - } else if (sender.hasPermission(PermissionsEnum.HELP.getPermission()) && args[0].startsWith("h")) { + } else if (sender.hasPermission(PermissionsEnum.HELP.getPermission()) && args[0].startsWith("he")) { tabComplete.add("help"); } else if (sender.hasPermission(PermissionsEnum.CANCEL_PREVIEW.getPermission()) && args[0].startsWith("i")) { tabComplete.add("cancel"); diff --git a/src/main/java/io/wdsj/imagepreviewer/image/ImageLoader.java b/src/main/java/io/wdsj/imagepreviewer/image/ImageLoader.java index ecc847f..a5396cc 100644 --- a/src/main/java/io/wdsj/imagepreviewer/image/ImageLoader.java +++ b/src/main/java/io/wdsj/imagepreviewer/image/ImageLoader.java @@ -129,7 +129,6 @@ private static Pair> readAllFramesGif(URL url imageTop = Integer.parseInt(imageDescriptorNode.getAttribute("imageTopPosition")); } - // Create a full-size frame if necessary if (previousFrame == null) { previousFrame = new BufferedImage( reader.getWidth(i), @@ -137,8 +136,6 @@ private static Pair> readAllFramesGif(URL url BufferedImage.TYPE_INT_ARGB ); } - - // Draw the current frame onto the full-size image BufferedImage combinedFrame = new BufferedImage( previousFrame.getWidth(), previousFrame.getHeight(),