Hey guys i'm having a little problem with coloring signs. I'm basically trying to have it if you type (in a sign): &3Hello &2Hi &1Hey it would replace all the color codes with § if anyone could help me out with this that would be great
@GeppiOMG Use the Chatcolor.replaceAlternateChatColor (or something like that) to replace "&" with that symbol\ Or, you can replace the & with that symbol using String.replace();
Lol i got u bra Code: //Option 1 //NOT FOR STORING, ONLY FOR PRINTING ChatColor.translateAlternateColorCodes('&', YOURSTRING); //Option 2 //Hint, use this YOURSTRING = YOURSTRING.replaceAll(&, §);
Oh. Well try getting the sign, and then reading its line Code: //Example get Sign s = (Sign) event.getClickedBlock().getState(); //AFTER YOU WRITE TO IT String SOMENAME; SOMENAME = s.getline(LINENUMBER);
You shouldn't use this. If you want to store the translated, use Code: someString = ChatColor.translateAlternateColorCodes('&', someString);