Is there a way for me to take a string like: Code: String msg = "<color1>This I want one color, <color2>and this I want a different" and replace <color1>/<color2> with a ChatColor. like <color1> would be ChatColor.GOLD and <color2> would be ChatColor.BLUE Thanks for the help! I figured it out Posting the code to help others Code: public void formatAndSend(String msg, Player player) { String message = msg; if (message.contains("<header>")) { message = message.replaceAll("<header>", ChatColor.GREEN.toString()); } if (message.contains("<error>")) { message = message.replaceAll("<error>", ChatColor.RED.toString()); } if (message.contains("<c1>")) { message = message.replaceAll("<c1>", ChatColor.GOLD.toString()); } if (message.contains("<c2>")) { message = message.replaceAll("<c2>", ChatColor.BLUE.toString()); } for (Player check : this.manageAddon.plugin.getServer().getOnlinePlayers()) { if (check.getName() == player.getName()) { player.sendMessage(message); } } } EDIT by Moderator: merged posts, please use the edit button instead of double posting.