Class MaterialParser
java.lang.Object
com.moyskleytech.obsidian.material.MaterialParser
Material parser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObsidianMaterialdeserialize(String str) Equivalent to ObsidianMaterial.valueOf with a try/catch Return STONE if the material is missingstatic Stringserialize(ObsidianMaterial itemTemplate) Serialize a material, always equal to .getKey()
-
Constructor Details
-
MaterialParser
public MaterialParser()
-
-
Method Details
-
deserialize
Equivalent to ObsidianMaterial.valueOf with a try/catch Return STONE if the material is missing- Parameters:
str- String representing the material- Returns:
- ObsidianMaterial
-
serialize
Serialize a material, always equal to .getKey()- Parameters:
itemTemplate- return a representation of the material- Returns:
- A string representing the object
-