Class ExprColorValues
java.lang.Object
io.github.syst3ms.skriptparser.lang.properties.PropertyExpression<Color,Object>
io.github.syst3ms.skriptparser.expressions.ExprColorValues
- All Implemented Interfaces:
Expression<Object>, SyntaxElement
Certain color values of a given color.
- Since:
- ALPHA
-
Field Summary
Fields inherited from class PropertyExpression
PROPERTY_IDENTIFIER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetProperty(Color owner) For each owner, this method will be ran individually to convert it to this particular property.Class<?> booleaninit(Expression<?>[] expressions, int matchedPattern, ParseContext parseContext) This defaultinit()implementation automatically properly sets the owner of this property, which can be accessed usingPropertyExpression.getOwner().toString(TriggerContext ctx, boolean debug) Methods inherited from class PropertyExpression
composePatterns, getOwner, getValues, isGenitive, isSingle, setOwner, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Expression
acceptsChange, acceptsChange, acceptsChange, change, check, check, convertExpression, getArray, getSingle, getSource, isAndList, isLoopOf, iterator, setAndList, stream
-
Constructor Details
-
ExprColorValues
public ExprColorValues()
-
-
Method Details
-
init
Description copied from class:PropertyExpressionThis defaultinit()implementation automatically properly sets the owner of this property, which can be accessed usingPropertyExpression.getOwner(). If this implementation is overridden for one reason or another, it must callPropertyExpression.setOwner(Expression)properly.- Specified by:
initin interfaceSyntaxElement- Overrides:
initin classPropertyExpression<Color,Object> - Parameters:
expressions- an array of expressions representing all the expressions that are being passed to this syntax element.matchedPattern- the index of the pattern that was successfully matched. It corresponds to the order of the syntaxes in registrationparseContext- an object containing additional information about the parsing of this syntax element, like regex matches and parse marks- Returns:
- whether the initialization was successful or not.
- See Also:
-
getProperty
Description copied from class:PropertyExpressionFor each owner, this method will be ran individually to convert it to this particular property.- Overrides:
getPropertyin classPropertyExpression<Color,Object> - Parameters:
owner- the owner- Returns:
- the property value
-
getReturnType
- Returns:
- the return type of this expression. By default, this is defined on registration, but, like Expression.isSingle(), can be overriden.
-
toString
- Specified by:
toStringin interfaceSyntaxElement- Overrides:
toStringin classPropertyExpression<Color,Object> - Parameters:
ctx- the eventdebug- whether to show additional information or not- Returns:
- a
Stringthat should aim to resemble what is written in the script as closely as possible
-