Solved ChatColor Alternate

Discussion in 'Spigot Plugin Help' started by iMedia, Jul 28, 2018.

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

    Supporter

    How do I make chatcolor.red to like &c I forgot
     
  2. Are you a developer or are you looking for a plugin?
     
  3. if youre a dev do:
    Code (Java):
    String chatColor = ChatColor.translateAlternateColorCodes('&', "&cThis will be same as ChatColor.RED!");
     
  4. iMedia

    Supporter

    Develoer I just forgot how to use chatcolor.alternate or something like that
     
  5. Just do what he says (Thank you btw)
    2nd argument obviously being the string you want to convert

    For code-related questions, please ask here next time
     
  6. Your question isn't too clear. Are you trying to covert to the color code or from of the color code?
     
  7. iMedia

    Supporter

    What's wrong with that??
    ChatColor.translateAlternateColorCodes('&', string);

    Whats wrong with that? "string" is invalid...
     
  8. There's no String called string.
     
  9. iMedia

    Supporter

    How do I fix it then?
     
  10. Use an existing string or just put the text you want to change between double quotes: "text"
    This is seriously as basic as Java gets
     
  11. iMedia

    Supporter

    .... I haven't done it in a long time
     
Thread Status:
Not open for further replies.