Create NMS itemstack

Discussion in 'Plugin Development' started by ceoepts, Oct 13, 2013.

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


    Hello im trying to create a nms itemstack but i am having so much problems its not funny anymore. Can someone please show me how to create a pumpkin nms itemstack. PLEASE.
  2. ceoepts I think you can convert a bukkit itemstack to an nms itemstack by invoking the getHandle() method. I'm not sure tho so tell me if it works.
  3. Offline


    Im pretty sure getHandle does not exist anymore this does not work:
    ItemStack nmsis = (CraftItemStack)is.getHandle();
    It sais The method getHandle() is undefined for the type CraftItemStack

    Meant ItemStack nmsis = ((CraftItemStack)is).getHandle();
    And i cant edit for some reason -.-

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 4, 2016
  4. Offline


    You have to use CraftItemStack.asNMSCopy(bukkitItemStack);
    Domi381 likes this.
Thread Status:
Not open for further replies.

Share This Page