Colored Kick Messages

Discussion in 'Plugin Development' started by iTidez, Jan 25, 2013.

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

    iTidez

    As I don't currently have access to a test server or an IDE, I am unable to test and check myself.

    My question is simple, is it possible to send colors to the client in the Kick Messages by sending a ChatColor.<color>, a section symbol and a number letter, or by directly using the /u9700<letter> extension I occasionally use if my color convert method glitches.

    If it is not possible through something like a player.kick(ChatColor.RED + "Banned for Griefing"); method, is it possible to apply a color through a proxy that interprets the kick message before sending the 0xFF (Kick) packet to the player? I know you can apply colors to the MOTD through proxy, so I see no reason it shouldn't, however I would like to know!

    Thanks for any and all input!
     
  2. iTidez
    Yes, it's possible.
     
  3. Offline

    RainoBoy97

    player.kickPlayer(ChatColor.RED + "Banned for Griefing");

    Should work ;)
     
  4. Offline

    iTidez

    Alright, thanks. I have just had no way of knowing if it works or not.

    Thanks to you both!
     
  5. Offline

    ZeusAllMighty11

    What I had to do at one point was use the code it's like \uSOMETHING with a bunch of stuff, but it worked. last 1 haracter in the SOMETHING were the color character
     
  6. ZeusAllMighty11
    You can just use ChatColor.<COLOUR_HERE> as RainoBoy97 said. That is effectively the same thing.
     
Thread Status:
Not open for further replies.

Share This Page