For newer Minecraft versions, use isAir to instead

This commit is contained in:
Ghost_chu committed 2021-07-28 01:26:57 +08:00
1 parent 687a232ce2
commit bc1bef573e
1 file changed
+9
@@ -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
*