public String formatMessage(ChatPlayer player, String message) {
		String output = "";
		String format = getFormat();
		ProxiedPlayer p = player.getPlayer();
		
		if (CommandUtil.hasPermission(p, NicknameCommand.PERMISSION_NODES)) {
			output = format.replace("%player", player.getDisplayName());
		} else {
			output = format.replace("%player", player.getName());
		}
		
		String server = player.getCurrentServer();
		if (plugin.serverNames.containsKey(server)) {
			output = output.replace("%server", plugin.serverNames.get(server));
		} else {
			output = output.replace("%server", server);
		}
		
		output = output.replace("%cname", channelName);

		if (plugin.useVault) {
			output = output.replace("%prefix", player.getPrefix());
			output = output.replace("%suffix", player.getSuffix());
		}else{
		output = output.replace("%prefix", "");
			
		output = output.replace("%suffix", "");
		}
		
		output = output.replace("%title", "");
		
		if (CommandUtil.hasPermission(p, PERMISSION_NODES_COLORED_CHAT)) {
			output = output.replace("%message", message);
			output = colorSub(output);
		} else {
			if (plugin.formatChat) {
				message = format(message);
				output = colorSub(output);
				output = output.replace("%message", message);
			} else {
				output = colorSub(output);
				output = output.replace("%message", message);
			}
		}
		
		return output;
	}