Interface MaterialSupport

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.bukkit.Material getForCurrent​(String v1_8, String v1_12, String v1_13)
      Get the right material for current version.
      org.bukkit.Material getMaterial​(String name)
      Get material by name.
      org.bukkit.Material getMaterialOr​(String name, org.bukkit.Material alternative)
      Get material by name or fallback material.
      org.bukkit.Material getSoil()  
      boolean isBed​(org.bukkit.Material material)
      Check if the given material is a bed.
      boolean isCake​(org.bukkit.Material material)
      Check if the given material is cake.
      boolean isConcrete​(org.bukkit.Material material)
      Check if the given material is concrete.
      boolean isConcretePowder​(org.bukkit.Material material)
      Check if the given material is concrete powder.
      boolean isGlass​(org.bukkit.Material material)
      Check if the given material is glass.
      boolean isGlassPane​(org.bukkit.Material material)
      Check if the given material is a glass pane.
      boolean isMaterial​(String name)
      Check if the given string is a valid material for the current server version.
      boolean isSoil​(org.bukkit.Material material)
      Check if the given material is soil.
      boolean isTerracotta​(org.bukkit.Material material)
      Check if the given material is terracotta.
      boolean isWool​(org.bukkit.Material material)
      Check if the given material is wool.
    • Method Detail

      • isMaterial

        boolean isMaterial​(String name)
        Check if the given string is a valid material for the current server version.
        Parameters:
        name - material name.
        Returns:
        true if material is valid.
      • getMaterial

        @Nullable
        org.bukkit.Material getMaterial​(String name)
        Get material by name.
        Parameters:
        name - material name.
        Returns:
        null if material name is invalid.
      • getMaterialOr

        org.bukkit.Material getMaterialOr​(String name,
                                          org.bukkit.Material alternative)
        Get material by name or fallback material.
        Parameters:
        name - material name.
        alternative - alternative material.
        Returns:
        alternative if name is null.
      • isWool

        boolean isWool​(org.bukkit.Material material)
        Check if the given material is wool.
        Parameters:
        material - target material.
        Returns:
        true if given material is wool.
      • isBed

        boolean isBed​(org.bukkit.Material material)
        Check if the given material is a bed.
        Parameters:
        material - target material.
        Returns:
        true if given material is bed.
      • isGlass

        boolean isGlass​(org.bukkit.Material material)
        Check if the given material is glass.
        Parameters:
        material - target material.
        Returns:
        true if given material is glass.
      • isGlassPane

        boolean isGlassPane​(org.bukkit.Material material)
        Check if the given material is a glass pane.
        Parameters:
        material - target material.
        Returns:
        true if given material is glass pane.
      • isTerracotta

        boolean isTerracotta​(org.bukkit.Material material)
        Check if the given material is terracotta.
        Parameters:
        material - target material.
        Returns:
        true if given material is stained clay.
      • isConcrete

        boolean isConcrete​(org.bukkit.Material material)
        Check if the given material is concrete.
        Parameters:
        material - target material.
        Returns:
        true if given material is concrete.
      • isConcretePowder

        boolean isConcretePowder​(org.bukkit.Material material)
        Check if the given material is concrete powder.
        Parameters:
        material - target material.
        Returns:
        true if given material is concrete powder.
      • getForCurrent

        @Nullable
        org.bukkit.Material getForCurrent​(String v1_8,
                                          String v1_12,
                                          String v1_13)
        Get the right material for current version.
        Parameters:
        v1_8 - material for 1.8 to 1.11 included.
        v1_12 - material for 1.12.
        v1_13 - material for 1.13 and newer.
        Returns:
        null if material is invalid.
      • isCake

        boolean isCake​(org.bukkit.Material material)
        Check if the given material is cake.
        Parameters:
        material - target material.
        Returns:
        true if given material is cake.
      • isSoil

        boolean isSoil​(org.bukkit.Material material)
        Check if the given material is soil.
      • getSoil

        org.bukkit.Material getSoil()