Package software.bluelib.utils.variant
Class ParameterUtils
java.lang.Object
software.bluelib.utils.variant.ParameterUtils
A
public final class that provides utility methods for managing custom parameters associated with entity variants.
This class contains methods to retrieve and handle custom parameters for variants, enabling the building and connecting of parameters to specific variants.
Key Methods:
getAllEntities()- Retrieves all entities present in the variant loader.getVariantsOfEntity(String)- Retrieves the variants of a specific entity.getCustomParameterForVariant(String, String, String)- Retrieves the value of a custom parameter for a given variant.
- Since:
- 1.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.gson.JsonElementgetCustomParameterForVariant(String pEntityName, String pVariantName, String pParameter) Apublic staticStringmethod that retrieves the value of a custom parameter for a specific variant.getVariantsOfEntity(String pEntityName)
-
Method Details
-
getAllEntities
Apublic staticSet<String>that retrieves all entities from the variant loader.This method accesses the
VariantLoaderto fetch all the entities present in theAllVariantsmap. -
getVariantsOfEntity
-
getCustomParameterForVariant
public static com.google.gson.JsonElement getCustomParameterForVariant(String pEntityName, String pVariantName, String pParameter) Apublic staticStringmethod that retrieves the value of a custom parameter for a specific variant.This method accesses the variant data for a specified entity and variant and retrieves the value of a custom parameter.
The method checks if the parameter exists and returns its value as a
String.- Parameters:
pEntityName-String- The name of the entity whose variant parameter is being queried.pVariantName-String- The name of the variant whose parameter is being queried.pParameter-String- The name of the custom parameter to retrieve.- Returns:
- The value of the custom parameter as a
String, ornullif not found. - Since:
- 1.3.0
-