need help setting lore

Discussion in 'Plugin Development' started by infern0g0d, Nov 13, 2013.

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

    infern0g0d

    theres 2 items i want to copy the lore from. the first item has the lore notch on it. the lore is written on the first line.
    the second item has the lore inferno written on the second line. i want to use getlore on both of these items. i then want to use setlore on a third item with notch written on the first line and inferno written on the second line.

    Code:java
    1. List<String> lines = i.getItem(1).getItemMeta().getLore();
    2. ArrayList<String> lorez = new ArrayList<String>();
    3. for (int x = 0; x < lines.size(); x++){
    4. lorez.add(lines.get(x));
    5.  
    6. ItemMeta im = c.getItemMeta();
    7. im.setLore(lorez);


    help plz

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

    amhokies

    infern0g0d
    I'm sorry. That was one really long run-on sentence and I didn't comprehend any of it.
     
  3. Offline

    infern0g0d

    getlore and setlore only sets the lore of one item. lores over write each other how can i make them not over write each other.
     
  4. Offline

    amhokies

    I still don't understand what you're trying to say.
     
  5. Offline

    infern0g0d

    im tring to copy multiple lores of an item
     
  6. Offline

    amhokies

    Items only have one lore. A List of Strings.
     
  7. Offline

    infern0g0d

    theres 2 items i want to copy the lore from. the first item has the lore notch on it. the lore is written on the first line.
    the second item has inferno written on the second line of lore. i want to use getlore on both of these items. i then want to use setlore on a third item with notch written on the first line and inferno written on the second line.
     
Thread Status:
Not open for further replies.

Share This Page