ChatColor Problem in Log and InGame Chat

Discussion in 'Plugin Development' started by surtic, Dec 2, 2011.

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

    surtic

    Hello There,

    I work under Mac OS X Lion with Eclipse. And the ChatColor dont work....

    Two Snippets:
    Code:
    logger.info(ChatColor.BLUE + "[MinePvP] : " + message);
    Code:
    player.sendMessage( ChatColor.BLUE + "Config wurde neu geladen");
    In the Console Log i get "?b[MinePvP] : disabled" (under OS X and Linux) but InGame i get the Chat in the Right Color.

    Whats wrong?

    Thanks for your Time.
     
  2. Offline

    TheFieldZy

    I don't think you can get color in console.
     
  3. Offline

    hatstand

    Any coloured chat/broadcasts that appears in-game is displayed with colours intact in the console. Not sure about logging, but this suggests colours do not work.

    You could emulate a chat message by sending a message to the Console, as opposed to logging it:
    Code:
    getServer().getConsoleSender().sendMessage(ChatColor.RED + "blah")
    If that doesn't work, then your terminal might not support colours.
     
  4. Offline

    surtic

    Thanks i test it, SimpleClans works with Colors in my Terminal :)

    Yes it works :) Thanks.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  5. Offline

    I_am_not_funny

    chatcolors in console doesn't work on windows, but they're fine on linux based systems and macs(apparently)
     
Thread Status:
Not open for further replies.

Share This Page