2 Lines

Discussion in 'Plugin Development' started by HelloThereItsMe, Mar 25, 2015.

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

    HelloThereItsMe

    Is there a way to make two lines in an item's lore? If so can you tell me how? Thanks
     
  2. Online

    timtower Administrator Administrator Moderator

  3. Offline

    HelloThereItsMe

  4. Offline

    sgavster

  5. Offline

    Funergy

    @HelloThereItsMe
    Well if you set the lore you need an arraylist as an argument. so just add more lines into the arraylist and then set the lore with the arraylist
     
  6. Offline

    caderape

    @HelloThereItsMe
    Get the itemmeta of your itemstack. Get the lore and add the lines you want. Then set the itemMeta to your itemstack
     
  7. Offline

    nverdier

    @HelloThereItsMe ItemMeta#setLore(List<String>). Just make the List have multiple entries.
     
  8. @HelloThereItsMe
    Code:
    ArrayList<String> lore = new ArrayList<String>();
    // Item stuff here.
    lore.add("Line one.", "Line two.");
    // Set item meta.
     
  9. Offline

    teej107

  10. @teej107 This isn't a spoon feed. Plenty of people already told him to make an ArrayList and add his lore to that. I was just showing the OP how to do it if he didn't know how to. No need to be rude. :)
     
  11. Offline

    Rocoty

    @CodePlaysMinecraft Except your code wouldn't compile and might just end up confusing the OP
     
  12. Offline

    Funergy

    I like how everyone tries to give him the same answer.
     
Thread Status:
Not open for further replies.

Share This Page