Package com.ranull.graves.util
Class MaterialUtil
java.lang.Object
com.ranull.graves.util.MaterialUtil
Utility class for handling various material-related operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Checks if the given string represents an air block.static boolean
isAir
(org.bukkit.Material material) Checks if the given material is an air block.static boolean
Checks if the given string represents lava.static boolean
isLava
(org.bukkit.Material material) Checks if the given material is lava.static boolean
isPlayerHead
(String string) Checks if the given string represents a player head.static boolean
isPlayerHead
(org.bukkit.Material material) Deprecated.This method is deprecated and will be removed in a future version.private static boolean
Checks if the given string represents a safe material.private static boolean
isSafe
(org.bukkit.Material material) Checks if the given material is considered safe.static boolean
isSafeNotSolid
(org.bukkit.Material material) Checks if the given material is not solid and is safe (i.e., not lava).static boolean
isSafeSolid
(org.bukkit.Material material) Checks if the given material is solid and safe (i.e., not lava).private static boolean
isSolid
(org.bukkit.Material material) Checks if the given material is solid.static boolean
Checks if the given string represents water.static boolean
isWater
(org.bukkit.Material material) Checks if the given material is water.
-
Constructor Details
-
MaterialUtil
public MaterialUtil()
-
-
Method Details
-
isAir
public static boolean isAir(org.bukkit.Material material) Checks if the given material is an air block.- Parameters:
material
- The material to check.- Returns:
- True if the material is air, false otherwise.
-
isAir
Checks if the given string represents an air block.- Parameters:
string
- The string to check.- Returns:
- True if the string represents air, false otherwise.
-
isLava
public static boolean isLava(org.bukkit.Material material) Checks if the given material is lava.- Parameters:
material
- The material to check.- Returns:
- True if the material is lava, false otherwise.
-
isLava
Checks if the given string represents lava.- Parameters:
string
- The string to check.- Returns:
- True if the string represents lava, false otherwise.
-
isSafeNotSolid
public static boolean isSafeNotSolid(org.bukkit.Material material) Checks if the given material is not solid and is safe (i.e., not lava).- Parameters:
material
- The material to check.- Returns:
- True if the material is not solid and safe, false otherwise.
-
isSafeSolid
public static boolean isSafeSolid(org.bukkit.Material material) Checks if the given material is solid and safe (i.e., not lava).- Parameters:
material
- The material to check.- Returns:
- True if the material is solid and safe, false otherwise.
-
isSolid
private static boolean isSolid(org.bukkit.Material material) Checks if the given material is solid.- Parameters:
material
- The material to check.- Returns:
- True if the material is solid, false otherwise.
-
isSafe
private static boolean isSafe(org.bukkit.Material material) Checks if the given material is considered safe.- Parameters:
material
- The material to check.- Returns:
- True if the material is safe, false otherwise.
-
isSafe
Checks if the given string represents a safe material.- Parameters:
string
- The string to check.- Returns:
- True if the string represents a safe material, false otherwise.
-
isWater
public static boolean isWater(org.bukkit.Material material) Checks if the given material is water.- Parameters:
material
- The material to check.- Returns:
- True if the material is water, false otherwise.
-
isWater
Checks if the given string represents water.- Parameters:
string
- The string to check.- Returns:
- True if the string represents water, false otherwise.
-
isPlayerHead
Deprecated.This method is deprecated and will be removed in a future version. Use
Checks if the given material is a player head.isPlayerHead(String)
instead.- Parameters:
material
- The material to check.- Returns:
- True if the material is a player head, false otherwise.
-
isPlayerHead
Checks if the given string represents a player head.- Parameters:
string
- The string to check.- Returns:
- True if the string represents a player head, false otherwise.
-