Cannot translate alternate color codes

Discussion in 'Spigot Plugin Development' started by CommandActor, Apr 18, 2017.

Thread Status:
Not open for further replies.
  1. Hi, I have this line in my code:
    Code (Text):
    String reqdisplayname = args[0];
    String newdisplayname = ChatColor.translateAlternateColorCodes("&", reqdisplayname);
    And I get this error:
    Can someone help me please?
     
  2. ChatColor.translateAlternateColorCodes('&', reqdisplayname);

    Use singular quotes (') instead of double quotes (") for the first argument.
     
Thread Status:
Not open for further replies.