Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by jerry_00, Mar 5, 2020.
How to get the digital ID of an item
i tried use item.getEntityID , but can't get
To get the Item ID: ItemStack#getTypeId()
To get the data: ItemStack#getData()#getData().
ok i will try , but Is there any difference between Item and ItemStack ?
Yes, Item is the Entity of an ItemStack (a drop).
If you want to get the ItemStack of an Item entity, just use Item#getItemStack().
I recommand you to check the javadoc: Item.