[UnSolved] How can I add a color code in my config.yml?

Discussion in 'Plugin Development' started by stantheman68, Oct 19, 2012.

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

    stantheman68

    Hi,

    I was just wonder how I could add a color code in my config, I understand the replaceAll(); and so on, but I do not what to add with the first part, please help.

    Thank You.
     
  2. Offline

    gomeow

    Replace something like &a with ChatColor.Red
     
  3. Offline

    stantheman68

    no no no, I mean I got that part, but what goes before the replaceAll(); part?
     
  4. Offline

    exload

    No! There is a method inside Bukkit that will do this all for you :)
    Code:java
    1.  
    2. player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&4hi"));
    3.  
     
  5. Offline

    stantheman68

    Still not much help, I want where when someone put's a color code number inside the config, it will automatically be printed out. For example, I am trying to make where the player may choose how they would like the Broadcast message.
     
Thread Status:
Not open for further replies.

Share This Page