Skip to content

Commit

Permalink
fix: do not error when attempting to parse "|" as a pattern (#2625)
Browse files Browse the repository at this point in the history
  • Loading branch information
dordsor21 committed Mar 17, 2024
1 parent 0db8154 commit 2d0a3e6
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -64,6 +64,7 @@
import com.sk89q.worldedit.world.entity.EntityTypes;
import com.sk89q.worldedit.world.registry.LegacyMapper;

import javax.annotation.Nonnull;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Locale;
Expand Down Expand Up @@ -337,9 +338,10 @@ public Stream<String> getSuggestions(String input) {
return SuggestionHelper.getBlockPropertySuggestions(blockType, props);
}

@Nonnull
private BaseBlock parseLogic(String input, ParserContext context) throws InputParseException {
//FAWE start
String[] blockAndExtraData = input.trim().split("\\|");
String[] blockAndExtraData = input.trim().split("(?<!^)\\|");
blockAndExtraData[0] = woolMapper(blockAndExtraData[0]);
Map<Property<?>, Object> blockStates = new HashMap<>();
//FAWE end
Expand Down

0 comments on commit 2d0a3e6

Please sign in to comment.