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

public class ExprColorValues extends PropertyExpression<Color,Object>
Certain color values of a given color.
Since:
ALPHA
  • Constructor Details

    • ExprColorValues

      public ExprColorValues()
  • Method Details

    • init

      public boolean init(Expression<?>[] expressions, int matchedPattern, ParseContext parseContext)
      Description copied from class: PropertyExpression
      This default init() implementation automatically properly sets the owner of this property, which can be accessed using PropertyExpression.getOwner(). If this implementation is overridden for one reason or another, it must call PropertyExpression.setOwner(Expression) properly.
      Specified by:
      init in interface SyntaxElement
      Overrides:
      init in class PropertyExpression<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 registration
      parseContext - 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

      public Object getProperty(Color owner)
      Description copied from class: PropertyExpression
      For each owner, this method will be ran individually to convert it to this particular property.
      Overrides:
      getProperty in class PropertyExpression<Color,Object>
      Parameters:
      owner - the owner
      Returns:
      the property value
    • getReturnType

      public Class<?> getReturnType()
      Returns:
      the return type of this expression. By default, this is defined on registration, but, like Expression.isSingle(), can be overriden.
    • toString

      public String toString(TriggerContext ctx, boolean debug)
      Specified by:
      toString in interface SyntaxElement
      Overrides:
      toString in class PropertyExpression<Color,Object>
      Parameters:
      ctx - the event
      debug - whether to show additional information or not
      Returns:
      a String that should aim to resemble what is written in the script as closely as possible