Class ExpressionPattern

java.lang.Object
com.sk89q.worldedit.function.pattern.AbstractPattern
com.fastasyncworldedit.core.function.pattern.ExpressionPattern
All Implemented Interfaces:
Filter, Pattern

public class ExpressionPattern extends AbstractPattern
A mask that evaluates an expression.

Expressions are evaluated as true if they return a value greater than 0.

  • Constructor Details

    • ExpressionPattern

      public ExpressionPattern(String input) throws ExpressionException
      Create a new instance.
      Parameters:
      input - the expression
      Throws:
      ExpressionException - thrown if there is an error with the expression
    • ExpressionPattern

      public ExpressionPattern(Expression expression)
      Create a new instance.
      Parameters:
      expression - the expression
  • Method Details

    • applyBlock

      public BaseBlock applyBlock(BlockVector3 vector)
      Description copied from interface: Pattern
      Return a BaseBlock for the given position.
      Parameters:
      vector - the position
      Returns:
      a block