<commit_before>package com.ForgeEssentials.util;

import java.util.logging.Logger;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.server.MinecraftServer;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.ObfuscationReflectionHelper;

public final class OutputHandler
{

	public static boolean verbose;

	public static Logger felog = Logger.getLogger("Forge Essentials");

	/**
	 * outputs a message in red text to the chat box of the given player.
	 * 
	 * @param msg
	 *            the message to be chatted
	 * @param player
	 *            player to chat to.
	 */
	public static void chatError(EntityPlayer player, String msg)
	{
		player.addChatMessage(FEChatFormatCodes.RED + msg);
	}

	/**
	 * outputs a message in bright green to the chat box of the given player.
	 * 
	 * @param msg
	 *            the message to be chatted
	 * @param player
	 *            player to chat to.
	 */
	public static void chatConfirmation(EntityPlayer player, String msg)
	{
		player.addChatMessage(FEChatFormatCodes.GREEN + msg);
	}

	/**
	 * outputs a string to the console if the code is in MCP
	 * 
	 * @param msg
	 *            message to be outputted
	 */
	public static void devdebug(Object msg)
	{
		if (!ObfuscationReflectionHelper.obfuscation)
		{
			System.out.println("DEBUG: >>>> " + msg);
		}
	}

	/**
	 * outputs a string to the console. Messages here are also logged.
	 * <commit_msg>All chat confirmations and chat errors SHOULD give proper color coding (e.g. group prefix confirmation).<commit_after>package com.ForgeEssentials.util;

import java.util.logging.Logger;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.server.MinecraftServer;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.ObfuscationReflectionHelper;

public final class OutputHandler
{

	public static boolean verbose;

	public static Logger felog = Logger.getLogger("Forge Essentials");

	/**
	 * outputs a message in red text to the chat box of the given player.
	 * 
	 * @param msg
	 *            the message to be chatted
	 * @param player
	 *            player to chat to.
	 */
	public static void chatError(EntityPlayer player, String msg)
	{
		FunctionHelper.formatColors(msg);
		player.addChatMessage(FEChatFormatCodes.RED + msg);
	}

	/**
	 * outputs a message in bright green to the chat box of the given player.
	 * 
	 * @param msg
	 *            the message to be chatted
	 * @param player
	 *            player to chat to.
	 */
	public static void chatConfirmation(EntityPlayer player, String msg)
	{
		FunctionHelper.formatColors(msg);
		player.addChatMessage(FEChatFormatCodes.GREEN + msg);
	}

	/**
	 * outputs a string to the console if the code is in MCP
	 * 
	 * @param msg
	 *            message to be outputted
	 */
	public static void devdebug(Object msg)
	{
		if (!ObfuscationReflectionHelper.obfuscation)
		{
			System.out.println("DEBUG: >>>> " + msg);
		}
	}

	/**
	 * outputs a string to the console. Messages here are also logged.
	 * 
{'fraction_non_alphanumeric': 0.09018830525272548, 'fraction_numerical': 0.0, 'mean_word_length': 3.1253405994550407, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2368258', 'n_tokens_mistral': 963, 'n_tokens_neox': 892, 'n_words': 288}