diff --git a/src/main/java/net/minestom/server/command/builder/arguments/minecraft/ArgumentItemStack.java b/src/main/java/net/minestom/server/command/builder/arguments/minecraft/ArgumentItemStack.java index 96b3b9559..f96ae449f 100644 --- a/src/main/java/net/minestom/server/command/builder/arguments/minecraft/ArgumentItemStack.java +++ b/src/main/java/net/minestom/server/command/builder/arguments/minecraft/ArgumentItemStack.java @@ -33,6 +33,18 @@ public class ArgumentItemStack extends Argument { @NotNull @Override public ItemStack 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:item_stack"; + + nodeMaker.addNodes(new DeclareCommandsPacket.Node[]{argumentNode}); + } + + public static ItemStack staticParse(@NotNull String input) throws ArgumentSyntaxException { final int nbtIndex = input.indexOf("{"); if (nbtIndex == 0) @@ -60,14 +72,6 @@ public class ArgumentItemStack extends Argument { } } - @Override - public void processNodes(@NotNull NodeMaker nodeMaker, boolean executable) { - DeclareCommandsPacket.Node argumentNode = simpleArgumentNode(this, executable, false, false); - argumentNode.parser = "minecraft:item_stack"; - - nodeMaker.addNodes(new DeclareCommandsPacket.Node[]{argumentNode}); - } - @Override public String toString() { return String.format("ItemStack<%s>", getId());