diff --git a/src/main/java/org/maxgamer/quickshop/util/Util.java b/src/main/java/org/maxgamer/quickshop/util/Util.java index f451b9d76..ff7e3e6d8 100644 --- a/src/main/java/org/maxgamer/quickshop/util/Util.java +++ b/src/main/java/org/maxgamer/quickshop/util/Util.java @@ -841,6 +841,10 @@ public class Util { } public static boolean isAir(@NotNull Material mat) { + try { + return isAir0(mat); // For newer versions, we had better use Bukkit API + } catch (Exception ignored) { + } if (mat == Material.AIR) { return true; } @@ -858,6 +862,11 @@ public class Util { return false; } + @SuppressWarnings("RedundantThrows") + private static boolean isAir0(@NotNull Material mat) throws Exception { + return mat.isAir(); + } + /** * Check a material is or not a WALL_SIGN *