diff --git a/src/main/java/net/minestom/server/command/builder/arguments/minecraft/ArgumentBlockState.java b/src/main/java/net/minestom/server/command/builder/arguments/minecraft/ArgumentBlockState.java index 82a820d8f..67540eed5 100644 --- a/src/main/java/net/minestom/server/command/builder/arguments/minecraft/ArgumentBlockState.java +++ b/src/main/java/net/minestom/server/command/builder/arguments/minecraft/ArgumentBlockState.java @@ -20,6 +20,18 @@ public class ArgumentBlockState extends Argument { @Override public @NotNull Block parse(@NotNull String input) throws ArgumentSyntaxException { + return staticParse(input); + } + + @Override + public void processNodes(@NotNull NodeMaker nodeMaker, boolean executable) { + DeclareCommandsPacket.Node argumentNode = simpleArgumentNode(this, executable, false, false); + argumentNode.parser = "minecraft:block_state"; + + nodeMaker.addNodes(new DeclareCommandsPacket.Node[]{argumentNode}); + } + + public static Block staticParse(@NotNull String input) throws ArgumentSyntaxException { final int nbtIndex = input.indexOf("["); if (nbtIndex == 0) throw new ArgumentSyntaxException("No block type", input, NO_BLOCK); @@ -46,14 +58,6 @@ public class ArgumentBlockState extends Argument { } } - @Override - public void processNodes(@NotNull NodeMaker nodeMaker, boolean executable) { - DeclareCommandsPacket.Node argumentNode = simpleArgumentNode(this, executable, false, false); - argumentNode.parser = "minecraft:block_state"; - - nodeMaker.addNodes(new DeclareCommandsPacket.Node[]{argumentNode}); - } - @Override public String toString() { return String.format("BlockState<%s>", getId());