From cc9c1f63d858b5efc2b76b95a47f477ae8d5bbbc Mon Sep 17 00:00:00 2001 From: MattBDev <4009945+MattBDev@users.noreply.github.com> Date: Sat, 17 Aug 2019 18:45:07 -0400 Subject: [PATCH] When an exception is actually being used it shouldn't be named ignored --- .../plotsquared/bukkit/listeners/SingleWorldListener.java | 4 ++-- .../intellectualsites/plotsquared/plot/PlotVersion.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/SingleWorldListener.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/SingleWorldListener.java index fc13147dd..a53527fc9 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/SingleWorldListener.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/SingleWorldListener.java @@ -30,8 +30,8 @@ import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils this.methodGetHandleChunk = classCraftChunk.getMethod("getHandle").getRealMethod(); try { this.mustSave = classChunk.getField("mustSave").getRealField(); - } catch (Throwable ignore) { - ignore.printStackTrace(); + } catch (NoSuchFieldException e) { + e.printStackTrace(); } Bukkit.getPluginManager().registerEvents(this, plugin); } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotVersion.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotVersion.java index 1d65c36e0..27e1a6afb 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotVersion.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/PlotVersion.java @@ -24,8 +24,8 @@ public class PlotVersion { public static PlotVersion tryParse(String version, String commit, String date) { try { return new PlotVersion(version, commit, date); - } catch (Exception ignore) { - ignore.printStackTrace(); + } catch (Exception e) { + e.printStackTrace(); return new PlotVersion(0, 0, 0, 0, 0); } }