Class MaterialHelper

java.lang.Object
co.crystaldev.alpinecore.util.MaterialHelper

public final class MaterialHelper extends Object
Utility for interoperability with XMaterials
Since:
0.3.1
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NotNull com.cryptomorin.xseries.XMaterial
    getType(@Nullable org.bukkit.block.Block block)
    Get the XMaterial equivalent of the given material.
    static @NotNull com.cryptomorin.xseries.XMaterial
    getType(@Nullable org.bukkit.inventory.ItemStack item)
    Get the XMaterial equivalent of the given material.
    static @NotNull com.cryptomorin.xseries.XMaterial
    getType(@Nullable org.bukkit.Location location)
    Get the XMaterial equivalent of the given material.
    static @NotNull com.cryptomorin.xseries.XMaterial
    getType(@Nullable org.bukkit.Material type)
    Get the XMaterial equivalent of the given material.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MaterialHelper

      public MaterialHelper()
  • Method Details

    • getType

      @NotNull public static @NotNull com.cryptomorin.xseries.XMaterial getType(@Nullable @Nullable org.bukkit.Material type)
      Get the XMaterial equivalent of the given material.
      Parameters:
      type - The Bukkit material.
      Returns:
      The wrapped material.
    • getType

      @NotNull public static @NotNull com.cryptomorin.xseries.XMaterial getType(@Nullable @Nullable org.bukkit.inventory.ItemStack item)
      Get the XMaterial equivalent of the given material.
      Parameters:
      item - The item stack.
      Returns:
      The wrapped material.
    • getType

      @NotNull public static @NotNull com.cryptomorin.xseries.XMaterial getType(@Nullable @Nullable org.bukkit.Location location)
      Get the XMaterial equivalent of the given material.
      Parameters:
      location - The block location.
      Returns:
      The wrapped material.
    • getType

      @NotNull public static @NotNull com.cryptomorin.xseries.XMaterial getType(@Nullable @Nullable org.bukkit.block.Block block)
      Get the XMaterial equivalent of the given material.
      Parameters:
      block - The block.
      Returns:
      The wrapped material.