Skip to content

Commit

Permalink
fix: use the correct block parser as the "default" (#4456)
Browse files Browse the repository at this point in the history
  • Loading branch information
dordsor21 authored Jul 9, 2024
1 parent 8f980c7 commit 98aab56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Core/src/main/java/com/plotsquared/core/util/BlockUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;

import java.util.List;

/**
* {@link BlockState} related utility methods
*/
Expand All @@ -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<InputParser<BaseBlock>> parsers = WorldEdit.getInstance().getBlockFactory().getParsers();
PARSER = parsers.get(parsers.size() - 1); // Default parser is always at the end
}

private BlockUtil() {
Expand Down

0 comments on commit 98aab56

Please sign in to comment.