So I know if I wanted to replace the letter r in a string with number 5 I would do: string.replace("r","5"); but what if I want to replace all instances of "r" to be a variable like the int data. or I wanted to make all instances of r be ChatColor.RED, if I would do "ChatColor.RED" then it wouldn't make the text red, it would just print out those exact words in place of r. Any help is appreciated. Also I don't know if I would have to completely do this a different way. Even maybe with something like %r, then do some kind of message formatting? I'm completely lost on this one. EDIT: And I would also use this for things that I customize like players names, or any other variable I may have created in a plugin. --Bump-- tried looking through Bukkit docs and things but still can't find help with how to do this EDIT by Moderator: merged posts, please use the edit button instead of double posting.
id suggest you read a bit on how java variables work. you are trying to use them in strange way that suggest that you are new at this.