New Line

Discussion in 'Plugin Development' started by HelGod, Oct 6, 2013.

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

    HelGod

    Does anyone know another way to go to the next line instead of using \n? I am getting an LF box when I use \n.
     
  2. Offline

    Goblom

    Code:java
    1. player.sendMessage("Line 1");
    2. player.sendMessage("Line 2");
     
    tommycake50 likes this.
  3. Offline

    HelGod

    Goblom
    That is definitely not what I needed :p. I am pretty sure most people who makes plugins knows that. I want to literally just make a new line for a string.
     
  4. Offline

    3ptO

    HelGod What are you using this for? Locale file?
     
  5. Offline

    HelGod

    No I am using the iconmenu and I need to make a new line for the lore. I would change it to a list of strings, but I have other menus that don't need a new line and stuff.
     
  6. Offline

    Goblom

    Although i am pretty sure i am write and most plugin developers do use that. I have created another way maybe more to your 'liking'
    Code:java
    1. public void newLine(String string) {
    2. for (String message : string.split("^^")) {
    3. player.sendMessage(message);
    4. }
    5. }


    HelGod It would have been nice to have that information before saying i was wrong

    Code:java
    1. ArrayList<String> lore = new ArrayList<String>();
    2. lore.add("INeedAnAdult");
    3.  
    4. meta.setLore(lore);


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

    HelGod

    Goblom
    I said I wanted to split a string I would've already done that if I could :p as I said before I am using the iconmenu so it is different and I really don't want to change it to list<String> because my other menus use that iconmenu class as well
     
  8. Offline

    The_Doctor_123

    A little rude, in my opinion. Especially considering I don't know what the heck you even want. What Goblom first gave you looks like what you wanted.
     
  9. Offline

    JPG2000

    HelGod Your pretty rude. What Goblom said is exactly how I would do it. Hes trying to help you, and your telling him he doesn't make plugins and everyone else knows that.

    Anyways, since you said IconMenu, Im asuming you want the title of the Menu to have 2 lines. Its impossible. (Tell me if I assumed wrong)
     
    Goblom likes this.
  10. Offline

    HelGod

    I need two lines for the lore, and I am not to sure how I would edit his method. It was not meant to be rude, it was just pointing something out. I apologize that I was sort of rude. Goblom I was making a mini-game and I was very anxious to find an answer to the problem because I was literally on the brink of finishing the game.
     
  11. Offline

    FlareLine

    Usually a newline in an item's lore text would be created by using the vertical bar ( | ) symbol?
     
  12. Offline

    Tirelessly

    HelGod Isn't lore naturally a List<String> anyway? Just add to the list.
     
  13. Offline

    HelGod

    Tirelessly
    It is, but I am using the iconmenu and the lore is a string, I would change it so it would be list string, but my other menus are using the iconmenu class and don't need mutliple lines
     
  14. Offline

    Tirelessly

    And you can't figure out how to edit IconMenu to allow for both?
     
  15. Offline

    HelGod

    Ob god :O I didnt even think about that. I will give it a try
     
Thread Status:
Not open for further replies.

Share This Page