Solved Kicking Players With New Lines?

Discussion in 'Plugin Development' started by Awesomedanguy, Jul 3, 2014.

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

    Awesomedanguy

    Hi Everyone!
    I need help with kicking players, with multiple lines of text.
    For Example,

    Code:java
    1. p.kickPlayer(ChatColor.BOLD + "Kicked.. bad boy :( // <-- This Works");


    But I Cannot Do,

    Code:java
    1. p.kickPlayer("Kicked!","Cya!" // <-- This Doesnt);


    Is there a way to kick people/ban people with multiple lines of text?

    Thanks,
    Dan
     
  2. you cannot put a comma in like that, as you are passing in two seperate strings. Kick player takes one string so if you want a new line just use "\n" without quotes. Im not sure tho if the kicked player message supports more than two lines. I could be wrong as I have never tried it.

    Code:java
    1. p.kickPlayer("Kicked! \n Cya!" );
     
  3. Offline

    unon1100

    Kick messages support multiple lines.
     
  4. Offline

    Awesomedanguy

    Thanks For The Explanation, teozfrank I saw some other threads and everyone like,
    "Put 2 slashes no, 1 back-slash" And I Just got all confused :p

    Thanks,
    Dan

    Just Realized, Little mistake in my coding,
    Code:java
    1. p.kickPlayer(""// Why Would Anyone Put An Annotation Here :P);


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
Thread Status:
Not open for further replies.

Share This Page