mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-26 18:39:44 -05:00
For newer Minecraft versions, use isAir to instead
This commit is contained in:
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
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user