Class Argument
java.lang.Object
ua.mcchickenstudio.opencreative.coding.arguments.Argument
Argument
This class represents an argument, a field that has id, name (path) and value. It's used to get values, like text, numbers, locations etc.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull StringgetPath()Returns a name of argument.@NotNull ValueTypegetType()Returns type of value.@NotNull ObjectReturns value of argument.booleanisList()Checks whether variable is a list.static @NotNull StringparseEntity(String text, ActionsHandler handler, Action action) Replaces placeholders in text with values.@NotNull StringtoString()
-
Field Details
-
planet
-
path
-
type
-
value
-
-
Constructor Details
-
Argument
-
-
Method Details
-
parseEntity
@NotNull public static @NotNull String parseEntity(String text, ActionsHandler handler, Action action) Replaces placeholders in text with values.- Parameters:
text- text to parse.handler- handler to get some values.action- action to get some values.- Returns:
- parsed text.
-
getPath
-
getType
-
getValue
Returns value of argument.If value is a link to variable or event value with null value, it will return link instead of null. That prevents from null pointer problems.
- Parameters:
action- action, that will be used, to parse text placeholders.- Returns:
- value of argument.
-
isList
public boolean isList()Checks whether variable is a list.- Returns:
- true - is list, false - not a list.
-
toString
-