Colour Code not working (§)

Discussion in 'Plugin Development' started by dylzqn, Jun 29, 2015.

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

    dylzqn

  2. Offline

    xepisolonxx

    @dylzqn You can always use ChatColor.<Color>
     
  3. Offline

    teej107

    @dylzqn That is what you should use.
     
  4. Well, it could be a number of things. Could we see the code? Or is this another plugin generating this error?
    1. It could be a misused symbol if it is a plugin you haven't made. If so, what plugin is it?
    2. Sending messages in some ways does not support colour codes eg sending a message using a logger.
     
  5. Offline

    dylzqn

    @Sulphate Here » http://prntscr.com/7n096a
    I'm pretty sure its got to do with the compiling portion of the project. I am using Intellij

    @teej107 @xepisolonxx I don't want to use that cause it will make my code longer and takes more time

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 12, 2016
  6. Offline

    SuperOriginal

    10/10 explanation

    i'm too lazy to do it correctly so i'll do it wrong and have issues instead.
     
    Last edited: Jun 30, 2015
  7. @dylzqn
    You can always use ChatColor.translateAlternateChatColors(<char>, <string>) e.g. replace all '&'
    OR, it's a bit longer to type but it will stay compitable, is type '\u00A7' instead of '§'
     
    Last edited: Jun 30, 2015
  8. @dylzqn Like everyone has suggested, use ChatColor.[Color]... Code being long doesn't matter. If you don't know the corresponding color to the color codes, you can click here for a list of color codes and their names.
     
  9. All ChatColor does is add the unicode character for § :/

    Why don't you send the messages another way? I'm pretty sure it will be because that method of sending a message does not support §, or ChatColor
     
  10. Offline

    Konato_K

    @dylzqn The problem is due to the encoding of the file and the JVM, they are different it makes the color code character to be two instead, it can be fixed by changing your encoding to the proper one or use ChatColor instead.
     
    CodePlaysMinecraft likes this.
Thread Status:
Not open for further replies.

Share This Page