Class MaterialCompat
java.lang.Object
com.github.relativobr.supreme.util.MaterialCompat
Resolves
XMaterial constants to a Material that exists on the running server.
Keeps Supreme loadable on legacy versions (e.g. 1.8.8) where modern constants (netherite, copper,
coral, colored concrete/wool/dye, 1.13+ woods, ...) are absent.
XMaterial.parseMaterial() already resolves pure renames (e.g. END_STONE ->
legacy ENDER_STONE) by itself; LEGACY_SUBSTITUTES only needs to cover materials
that genuinely did not exist before the 1.13+ flattening, so it maps them to a sensible
legacy-safe stand-in. Anything neither resolvable nor in the map falls back to
Material.STONE so this method never returns null.
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.Materialsafe(io.github.thebusybiscuit.slimefun5.libraries.xseries.XMaterial material)
-
Method Details
-
safe
@Nonnull public static org.bukkit.Material safe(@Nonnull io.github.thebusybiscuit.slimefun5.libraries.xseries.XMaterial material)
-