How can i get ItemStack of any item/block 1.12.2

Discussion in 'Plugin Development' started by DGGDAK47, Sep 12, 2018.

Thread Status:
Not open for further replies.
  1. Offline


    Hello. I want to create ItemStack instance using counstructor ItemStack(Material m, int amount), but Bukkit 1.12.2 version has no all items/blocks in enum Material. I suuposed i can use deprecated method setTypeid() for pointing second id number ( that goes after : symbol), but it sets only first id number. So, how can i get any item/block from ItemStack instance, by using full item id (95:7, 351:13, etc.) in Bukkit 1.12.2?
  2. Offline


    ItemStack <name> = new ItemStack(Material.<materialtype>;
    Make sure you're importing the right itemstack!!!!! upload_2018-9-14_19-56-4.png
    This MUST be the bukkit one!
  3. Online


    @KoalaOnCaffeine You forgot a bracket after "<materialtype>", just letting you know. :p
  4. Offline


    Didn't even notice lol :p
    KarimAKL likes this.
Thread Status:
Not open for further replies.

Share This Page