Solved Multiple ChatColor options

Discussion in 'Plugin Development' started by Leviticalpixel10, Dec 31, 2016.

Thread Status:
Not open for further replies.
  1. Hi there hopefully someone will read this cause I bet its quite easy but how do you do multiple chatcolor options. Like im trying to do
    Code:
    setDisplayName(ChatColor.RESET + ChatColor.RED + "blah")
    but it's saying "operator '+' is undefined" Can someone help me
     
  2. @Leviticalpixel10
    You can't have two ChatColors next to eachother, as the compiler doesn't realize you want a String then. Put "toString()" on one of them and it'll work. Like this:
    Code:java
    1. setDisplay..(ChatColor.RESET.toString() + ChatColor.RED + "blah")
     
  3. Ok thanks @AlvinB !
    Edit: It works! Thanks.
     
Thread Status:
Not open for further replies.

Share This Page