Colored text to color codes

Discussion in 'Plugin Development' started by Welite, Apr 10, 2014.

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

    Welite

    Hi, lets say I have color text on a sign line and when I get the text from the line and it returns the text but without color codes.


    Example
    I have a sign on first line there is this text: &5Hi &bBukkit and when the sign is placed it just displays "Hi" in purple color and "Bukkit" in aqua color, and now I need to get the text in the original form so: " &5Hi &bBukki"
     
  2. Offline

    unforgiven5232

    Theres different ways to change text color, so try another way besides ChatColor. <color>
     
  3. Offline

    Wizehh

    Code:
    ChatColor#stripColor(String str)
     
  4. Offline

    rfsantos1996

    http://jd.bukkit.org/rb/apidocs/org/bukkit/ChatColor.html#stripColor(java.lang.String)
     
Thread Status:
Not open for further replies.

Share This Page