Class MaterialUtil

java.lang.Object
com.ranull.graves.util.MaterialUtil

public final class MaterialUtil extends Object
Utility class for handling various material-related operations.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    isAir(String string)
    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
    isLava(String string)
    Checks if the given string represents lava.
    static boolean
    isLava(org.bukkit.Material material)
    Checks if the given material is lava.
    static boolean
    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
    isSafe(String string)
    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
    isWater(String string)
    Checks if the given string represents water.
    static boolean
    isWater(org.bukkit.Material material)
    Checks if the given material is water.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static boolean isAir(String string)
      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

      public static boolean isLava(String string)
      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

      private static boolean isSafe(String string)
      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

      public static boolean isWater(String string)
      Checks if the given string represents water.
      Parameters:
      string - The string to check.
      Returns:
      True if the string represents water, false otherwise.
    • isPlayerHead

      @Deprecated public static boolean isPlayerHead(org.bukkit.Material material)
      Deprecated.

      This method is deprecated and will be removed in a future version. Use isPlayerHead(String) instead.

      Checks if the given material is a player head.
      Parameters:
      material - The material to check.
      Returns:
      True if the material is a player head, false otherwise.
    • isPlayerHead

      public static boolean isPlayerHead(String string)
      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.