Combine ChatColor.<color> and ChatColor.Italic ?

Discussion in 'Plugin Development' started by suckycomedian, Apr 22, 2012.

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

    suckycomedian

    How do you make the font Italic and <color> in a message? if you do something like ChatColor.Blue.Italic it only makes it blue and it doesn't like you use + to combine them...
     
  2. Offline

    Darq

    sender.sendMessage(ChatColor.ITALIC + ChatColor.BLUE + "derp"); ?
     
  3. Offline

    suckycomedian

    "it doesn't like you use + to combine them..."
     
  4. Offline

    Darq

    I see that now. "§9§oderp" :D
     
  5. Offline

    Prgr

    I use:
    ChatColor.GRAY + "" + ChatColor.ITALIC + "Hello"
     
  6. Offline

    suckycomedian

    ok cool. i'll try that later :D
     
  7. Offline

    dillyg10

    You have to use coloring then formating bud :).
     
  8. Offline

    messageofdeath

    Make variable's and set it up like this
    PHP:
    public String bold ChatColor.BOLD "";
     
    //To send a message use
     
    player.sendMessage(ChatColor.RED bold "What you want to send");
     
  9. Offline

    desht

    You can also use toString() (which is what's happening implicitly when you concatentate with "" anyway):
    PHP:
    ChatColor.ITALIC.toString() + ChatColor.BLUE.toString() + "your message";
     
    DeCraizq and Tim Visee like this.
  10. Offline

    Tim Visee

    Yes this one should work.
     
Thread Status:
Not open for further replies.

Share This Page