Solved Color Codes not working

Discussion in 'Plugin Development' started by MagmaticBacca, Aug 1, 2015.

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

    MagmaticBacca

    For example when implementing the code :
    Code:
    if (player.isOp()) {
                event.setFormat(ChatColor.DARK_RED+"§lOWNER" + " " + ChatColor.GOLD + player.getName() + ": " + ChatColor.RED + event.getMessage()
    Now notice the § part normally it should make the said Text Bold but in my case...


    instead it has a weird "?" symbol

    HALP

    if you do not know please direct me to somewhere i can find the answer/ or find a way to make something colored but also bold at the same time :D
     
  2. Instead of using '§', use the ChatColor enums.
     
  3. Offline

    WPM

    They are the same thing.
     
  4. Offline

    timtower Administrator Administrator Moderator

    Moved to plugin development
     
  5. Offline

    Gater12

  6. Offline

    teej107

    Obviously not! This thread is the reason why we have ChatColors and why you should use them.
     
    MrBlackIsBack likes this.
  7. Offline

    MagmaticBacca

    OK pardon me if i am misunderstanding but you mean the "ChanColor.GOLD" kind of thing right? using those enums to color the String that you add it to.

    IE: ChatColor.White + "Potato"
    thats good and all but i need to have that Color BOLD


    so how do i have that Color and have it bold at the same time using said enums?

    Sorry if i am being a bother :p
     
  8. Offline

    Abs0rbed

    @MagmaticBacca lol ChatColor.DARK_RED + "" + ChatColor.BOLD + message
    it's meant to be prepended to a string, so just throw an empty one in there
     
  9. Offline

    MagmaticBacca

    Im suprised i havent tried that yet xD Thabks so much everyone

    EDIT: #Thabks
     
  10. Please mark the thread as solved
     
    The_BloodHound likes this.
  11. Offline

    The_BloodHound

    To mark a thread solved, go to the top, edit thread, and select the prefix Solved.
     
Thread Status:
Not open for further replies.

Share This Page