tgxn / Backup

A Backup plugin for the Bukkit Server API.
http://bukkitbackup.com
GNU General Public License v3.0
23 stars 14 forks source link

Color Broadcasts. #126

Closed tgxn closed 12 years ago

tgxn commented 12 years ago

Can you make it so we can colour the broadcasts please? if you want a function to do this, this is what i use in my plugins to colourise text with &a, &b etc:

public static String convertColors(String str) { Pattern color_codes = Pattern.compile("&([0-9A-Fa-fkKLlOoMmNn])"); Matcher find_colors = color_codes.matcher(str); while (find_colors.find()) { str = find_colors.replaceFirst(new StringBuilder().append(ChatColor.COLOR_CHAR).append(find_colors.group(1)).toString()); find_colors = color_codes.matcher(str); } return str; }

tgxn commented 12 years ago

I understood this was already implemented, but I will review the code and check.

tgxn commented 12 years ago

This is already in the plugin?

Functionality is as described in: http://www.minecraftwiki.net/wiki/Formatting_codes Closing ticket.