Class SkriptPattern

java.lang.Object
ch.njol.skript.patterns.SkriptPattern

public class SkriptPattern extends Object
  • Constructor Details

    • SkriptPattern

      public SkriptPattern(PatternElement first, int expressionAmount)
  • Method Details

    • match

      @Nullable public @Nullable MatchResult match(String expr, int flags, ParseContext parseContext)
    • match

      @Nullable public @Nullable MatchResult match(String expr)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • countTypes

      public int countTypes()
      Returns:
      the size of the MatchResult.expressions array from a match.
    • countNonNullTypes

      public int countNonNullTypes()
      Count the maximum amount of non-null types in this pattern, i.e. the maximum amount of non-null values in the MatchResult.expressions array from a match.
      See Also:
    • getElements

      public <T extends PatternElement> List<T> getElements(Class<T> type)
      A method to obtain a list of all pattern elements of a specified type that are represented by this SkriptPattern.
      Type Parameters:
      T - The type of pattern element.
      Parameters:
      type - The type of pattern elements to obtain.
      Returns:
      A list of all pattern elements of the specified type represented by this SkriptPattern.