Class MaterialCompat

java.lang.Object
io.github.addoncommunity.galactifun.util.MaterialCompat

public final class MaterialCompat extends Object
Resolves XMaterial constants to a Material that exists on the running server. Keeps Galactifun loadable on legacy versions where modern constants (e.g. NETHERITE_INGOT, *_CONCRETE_POWDER) are absent.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.Material
    safe(io.github.thebusybiscuit.slimefun5.libraries.xseries.XMaterial material)
     
    static org.bukkit.inventory.ItemStack
    stack(io.github.thebusybiscuit.slimefun5.libraries.xseries.XMaterial material)
    Resolves an XMaterial to an ItemStack, preserving the legacy data value safe(XMaterial) drops on 1.8-1.12.

    Methods inherited from class Object

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

    • safe

      @Nonnull public static org.bukkit.Material safe(@Nonnull io.github.thebusybiscuit.slimefun5.libraries.xseries.XMaterial material)
    • stack

      @Nonnull public static org.bukkit.inventory.ItemStack stack(@Nonnull io.github.thebusybiscuit.slimefun5.libraries.xseries.XMaterial material)
      Resolves an XMaterial to an ItemStack, preserving the legacy data value safe(XMaterial) drops on 1.8-1.12.