From 98aab56616e6cab8e5d8010139a2df174c04cd01 Mon Sep 17 00:00:00 2001 From: Jordan Date: Tue, 9 Jul 2024 08:49:03 +0200 Subject: [PATCH] fix: use the correct block parser as the "default" (#4456) --- Core/src/main/java/com/plotsquared/core/util/BlockUtil.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/util/BlockUtil.java b/Core/src/main/java/com/plotsquared/core/util/BlockUtil.java index 0bc2543dd..27a7064c4 100644 --- a/Core/src/main/java/com/plotsquared/core/util/BlockUtil.java +++ b/Core/src/main/java/com/plotsquared/core/util/BlockUtil.java @@ -31,6 +31,8 @@ import com.sk89q.worldedit.world.registry.LegacyMapper; import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; +import java.util.List; + /** * {@link BlockState} related utility methods */ @@ -43,7 +45,8 @@ public final class BlockUtil { PARSER_CONTEXT.setRestricted(false); PARSER_CONTEXT.setPreferringWildcard(false); PARSER_CONTEXT.setTryLegacy(true); - PARSER = WorldEdit.getInstance().getBlockFactory().getParsers().get(0); + List> parsers = WorldEdit.getInstance().getBlockFactory().getParsers(); + PARSER = parsers.get(parsers.size() - 1); // Default parser is always at the end } private BlockUtil() {