Hey! Quick question here: is there any way to get 64 of an item in a itemstack?? I have tried adding a second for loop.. PHP: for(int i = 0; i < Integer.parseInt(args[2]); i++) { for(int x = 0; x < 64; x++) { p.getInventory().addItem(new ItemStack(Material.getMaterial(Integer.parseInt(args[1])))); } } Would appreciate !
Why don't you just setAmount(64) with the ItemStack ? for example: Code: ItemStack Stack= new ItemStack(352); Stack.setAmount(64);
There are additional ItemStack constructors that take amounts as well. Code: ItemStack stack = new ItemStack(352, 64);
A few revisions ago putting the ID and amount on the same function wouldn't work, nice to see that it works now