mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
fix: do not error when attempting to parse "|" as a pattern (#2625)
This commit is contained in:
parent
0db8154546
commit
2d0a3e6081
@ -64,6 +64,7 @@ import com.sk89q.worldedit.world.entity.EntityType;
|
|||||||
import com.sk89q.worldedit.world.entity.EntityTypes;
|
import com.sk89q.worldedit.world.entity.EntityTypes;
|
||||||
import com.sk89q.worldedit.world.registry.LegacyMapper;
|
import com.sk89q.worldedit.world.registry.LegacyMapper;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
@ -337,9 +338,10 @@ public class DefaultBlockParser extends InputParser<BaseBlock> {
|
|||||||
return SuggestionHelper.getBlockPropertySuggestions(blockType, props);
|
return SuggestionHelper.getBlockPropertySuggestions(blockType, props);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
private BaseBlock parseLogic(String input, ParserContext context) throws InputParseException {
|
private BaseBlock parseLogic(String input, ParserContext context) throws InputParseException {
|
||||||
//FAWE start
|
//FAWE start
|
||||||
String[] blockAndExtraData = input.trim().split("\\|");
|
String[] blockAndExtraData = input.trim().split("(?<!^)\\|");
|
||||||
blockAndExtraData[0] = woolMapper(blockAndExtraData[0]);
|
blockAndExtraData[0] = woolMapper(blockAndExtraData[0]);
|
||||||
Map<Property<?>, Object> blockStates = new HashMap<>();
|
Map<Property<?>, Object> blockStates = new HashMap<>();
|
||||||
//FAWE end
|
//FAWE end
|
||||||
|
Loading…
Reference in New Issue
Block a user