Skip to content

Commit

Permalink
Explicitly Mask or Pattern in parseFromInput
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeranny committed Jul 20, 2024
1 parent 561ef4a commit d78a9bb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import com.sk89q.worldedit.extension.factory.parser.mask.OffsetMaskParser;
import com.sk89q.worldedit.extension.factory.parser.mask.RegionMaskParser;
import com.sk89q.worldedit.extension.factory.parser.mask.SolidMaskParser;
import com.sk89q.worldedit.extension.input.InputParseException;
import com.sk89q.worldedit.extension.input.NoMatchException;
import com.sk89q.worldedit.extension.input.ParserContext;
import com.sk89q.worldedit.function.mask.Mask;
Expand Down Expand Up @@ -132,6 +133,11 @@ public List<String> getSuggestions(String input, final ParserContext parserConte

//FAWE start - rich mask parsing

@Override
public Mask parseFromInput(String input, ParserContext context) throws InputParseException {
return super.parseFromInput(input, context);
}

@Override
protected Mask getParsed(final String input, final List<Mask> masks) {
return switch (masks.size()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@
import com.sk89q.worldedit.extension.factory.parser.pattern.RandomStatePatternParser;
import com.sk89q.worldedit.extension.factory.parser.pattern.SingleBlockPatternParser;
import com.sk89q.worldedit.extension.factory.parser.pattern.TypeOrStateApplyingPatternParser;
import com.sk89q.worldedit.extension.input.InputParseException;
import com.sk89q.worldedit.extension.input.NoMatchException;
import com.sk89q.worldedit.extension.input.ParserContext;
import com.sk89q.worldedit.function.pattern.Pattern;
import com.sk89q.worldedit.function.pattern.RandomPattern;
import com.sk89q.worldedit.internal.registry.AbstractFactory;
Expand Down Expand Up @@ -130,6 +132,13 @@ public PatternFactory(WorldEdit worldEdit) {
register(new VoronoiPatternParser(worldEdit));
}

//FAWE start - rich pattern parsing

@Override
public Pattern parseFromInput(String input, ParserContext context) throws InputParseException {
return super.parseFromInput(input, context);
}

@Override
protected Pattern getParsed(final String input, final List<Pattern> patterns) {
switch (patterns.size()) {
Expand Down

0 comments on commit d78a9bb

Please sign in to comment.