Multiple line String[Still need a solution]

Discussion in 'Plugin Development' started by ThrustLP, Apr 12, 2014.

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

    ThrustLP

    Hello!

    Code:java
    1. public void loadConfig(){
    2. getConfig().addDefault("IAjl.joinmessage", new String("%p online"));
    3. getConfig().addDefault("IAjl.joinmessagetoplayer", new String(""));
    4. getConfig().addDefault("IAjl.quitmessage", new String[]{
    5. "l1",
    6. "l2",
    7.  
    8.  
    9.  
    10.  
    11. });
    12.  
    13.  
    14. getConfig().options().copyDefaults(true);
    15.  
    16. saveConfig();
    17.  
    18. }
    19.  

    Now in the chat it looks like this:

    [l1, l2]

    But I want to let it look like:

    l1
    l2


    How can I do this?
     
  2. Offline

    mydream

    try to delete ,
    "l1"
    "l2"
     
  3. Offline

    ThrustLP

    mydream

    Syntax error on token "l2"
     
  4. Offline

    PatoTheBest

  5. Offline

    ThrustLP

    This part is the only important part I think
     
  6. Offline

    ThrustLP

    No ideas?
     
  7. Offline

    Nalydmerc

    Have you tried using "\n"? That symbolizes a new line. I'm not sure if it would work in a config, but it's worth a shot.
     
Thread Status:
Not open for further replies.

Share This Page