Ignore colors

Discussion in 'Plugin Development' started by mydeblob, Apr 5, 2014.

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

    mydeblob

    Hi
    When I'm comparing two strings is it possible that I can ignore color codes?
    If I have 1 string that's like &2String and another that's just String they won't be equal because the first one is colored. Is there a method like ignoreColorCodes?
     
  2. Offline

    xXSniperzzXx_SD

    mydeblob
    Your best bet would to use: ChatColor.stripColors(string).equals(ChatColor.stripColor(string2)
     
Thread Status:
Not open for further replies.

Share This Page