3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 18:40:05 +01:00

fix: do not error when attempting to parse "|" as a pattern (#2625)

Dieser Commit ist enthalten in:
Jordan 2024-03-17 13:15:28 +01:00 committet von GitHub
Ursprung 0db8154546
Commit 2d0a3e6081
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194

Datei anzeigen

@ -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