1.14.4 ItemStack

Discussion in 'Spigot Plugin Development' started by THE_REal_jadENO, Jul 19, 2021.

  1. ItemStack i = new ItemStack(351, 4+Multiplikator, (short) 4);

    The constructor ItemStack(int, int, short) is undefined...
  2. It already tells you the reason, there is no such constructor in the ItemStack class. You can look up available constructors for the ItemStack class here.
  3. You need to give a Material as the first argument.
    You can see a list of constructors here
  4. Use Material.getMaterial(351) instead.
    • Agree Agree x 1
  5. ItemStack from item ID does not exist anymore since 1.13
  6. getMaterial(ID) does not exist either since 1.13
  7. As of 1.13, Material.getMaterial is not available. Material.STONE used like this.
  8. Yes, of course. If you make a plugin where you can configure the items of a GUI or relative from config, it is necessary.