Package me.yleoft.zAPI.utils
Class MaterialUtils
java.lang.Object
me.yleoft.zAPI.utils.MaterialUtils
Utility class for Material related operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull org.bukkit.MaterialgetLegacyMaterial(@NotNull String name) Gets a Legacy Material from a string.static @NotNull org.bukkit.MaterialgetMaterial(@NotNull String materialString) Gets a Material from a string.static booleanisLegacyMaterial(@NotNull String name) Checks if a material is a legacy material.
-
Constructor Details
-
MaterialUtils
public MaterialUtils()
-
-
Method Details
-
getMaterial
@NotNull public static @NotNull org.bukkit.Material getMaterial(@NotNull @NotNull String materialString) Gets a Material from a string.- Parameters:
materialString- The string to get the material from.- Returns:
- The Material.
-
getLegacyMaterial
@NotNull public static @NotNull org.bukkit.Material getLegacyMaterial(@NotNull @NotNull String name) Gets a Legacy Material from a string.- Parameters:
name- The string to get the material from.- Returns:
- The Legacy Material.
-
isLegacyMaterial
Checks if a material is a legacy material.- Parameters:
name- The string to check.- Returns:
- True if the material is a legacy material, false otherwise.
-