Interface InputSource


public interface InputSource
An InputSource represents a syntax that can provide a value for ExprInput to use.
See Also:
  • ExprFilter
  • EffSort
  • Method Details

    • getDependentInputs

      Set<ch.njol.skript.expressions.ExprInput<?>> getDependentInputs()
      Returns:
      A mutable Set of ExprInputs that depend on this source.
    • getCurrentValue

      @Nullable @Nullable Object getCurrentValue()
      Returns:
      The current value that ExprInput should use.
    • hasIndices

      default boolean hasIndices()
      InputSources that can supply indices along with values should override this method to indicate their ability.
      Returns:
      Whether this source can return indices.
    • getCurrentIndex

      default @UnknownNullability String getCurrentIndex()
      This should only be used by InputSources that return true for hasIndices().
      Returns:
      The current value's index.
    • parseExpression

      @Nullable default @Nullable Expression<?> parseExpression(String expr, ParserInstance parser, int flags)
      Parses an expression using the given input source and parser instance.
      Parameters:
      expr - the string expression to be parsed.
      parser - the parser instance used for parsing the expression.
      Returns:
      the parsed expression, or null if the parsing fails.