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 booleanChecks if the given string represents an air block.static booleanisAir(org.bukkit.Material material) Checks if the given material is an air block.static booleanChecks if the given string represents lava.static booleanisLava(org.bukkit.Material material) Checks if the given material is lava.static booleanisPlayerHead(String string) Checks if the given string represents a player head.static booleanisPlayerHead(org.bukkit.Material material) Deprecated.This method is deprecated and will be removed in a future version.private static booleanChecks if the given string represents a safe material.private static booleanisSafe(org.bukkit.Material material) Checks if the given material is considered safe.static booleanisSafeNotSolid(org.bukkit.Material material) Checks if the given material is not solid and is safe (i.e., not lava).static booleanisSafeSolid(org.bukkit.Material material) Checks if the given material is solid and safe (i.e., not lava).private static booleanisSolid(org.bukkit.Material material) Checks if the given material is solid.static booleanChecks if the given string represents water.static booleanisWater(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.
-