Colors not working?

Discussion in 'Plugin Development' started by candyfloss20, Jun 28, 2015.

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

    candyfloss20

    Code:
    p.sendMessage(Main.success + "Showing Commands for \"§b"+ Bukkit.getServer().getName()+"\"");
    Prints out this: http://prntscr.com/7mcef8

    Anyone got any ideas why § is not working?
     
  2. You saved it as an other format than UTF-8 I think
     
  3. Offline

    Zeinaty

    You aren't supposed to use the section sign, I believe that you're supposed use ChatColor.COLOR like so.

    Code:
    p.sendMessage(ChatColor.AQUA + "Hello");
    This would just send the player a message saying "Hello" in Aqua (&b)
     
    Zombie_Striker likes this.
  4. Offline

    Zombie_Striker

    It's better to stick with ChatColors. Just type your string and add "first part"+Chatcolor.COLOR+"coloured part"
     
  5. It isn't better. http://bukkit.org/posts/3152786
     
  6. Offline

    xTrollxDudex

    Don't use the section symbol. It makes your code liable to break in the future, liable to encoding formats, makes the code hard to read and understand, and is a magic number meaning that people who don't understand the minecraft chat and how it works will be confused by it.
     
Thread Status:
Not open for further replies.

Share This Page