Custom inv question

Discussion in 'Plugin Development' started by Go Hard, Oct 17, 2013.

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

    Go Hard

    I know how to add items to the custom inventory but how to i make spaces between the items?
     
  2. Offline

    Harmings

    Go Hard yourInv.setItem(theSlot, theItem);
     
  3. Offline

    1Achmed1

    If you specifically set where each item is, then you just don't specify...
     
  4. Offline

    remremrem

    When you add an item to an inventory, specify which slot number to place it in.

    inventory.setItem(slotnumber, item)
     
  5. Offline

    Go Hard

    remremrem
    how do i do it if the item has a custom name?
     
  6. Offline

    remremrem

    If you are creating the items in the inventory, you must set the item's metadata
    meta = ItemStack.getItemMeta()
    meta.setDisplayName("custom name")
    meta.setLore(<arraylist of lore lines>)

    search this forum for setlore and itemmeta to learn more. Also check the api docs
     
Thread Status:
Not open for further replies.

Share This Page