In-Game Colors

Discussion in 'Plugin Development' started by webbhead, Feb 21, 2014.

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

    webbhead

    Okay, my problem is I do not know how to make it so Chat Colors are able to be used through: '&c'
    I need this so I can use it such as: /nick &c<message> or /msg &c<message>
     
  2. Offline

    1Rogue

    Code:java
    1. String rawString = "&cExample";
    2. String converted = ChatColor.translateAlternateColorCodes('&', rawString);
     
  3. Offline

    webbhead

    1Rogue
    "converted" is unused.
     
  4. Offline

    1Rogue


    Then use it? The chatcolor method simply returns a string with converted color codes. You don't need to copy/paste my example.
     
Thread Status:
Not open for further replies.

Share This Page