    001package cpw.mods.fml.common.modloader;
    002
    003import net.minecraft.network.NetServerHandler;
    004import net.minecraft.network.packet.*;
    005import cpw.mods.fml.common.network.IChatListener;
    006
    007public class ModLoaderChatListener implements IChatListener
    008{
    009
    010    private BaseModProxy mod;
    011
    012    public ModLoaderChatListener(BaseModProxy mod)
    013    {
    014        this.mod = mod;
    015    }
    016
    017    @Override
    018    public Packet3Chat serverChat(NetHandler handler, Packet3Chat message)
    019    {
    020        mod.serverChat((NetServerHandler)handler, message.message);
    021        return message;
    022    }
    023
    024    @Override
    025    public Packet3Chat clientChat(NetHandler handler, Packet3Chat message)
    026    {
    027        mod.clientChat(message.message);
    028        return message;
    029    }
    030
    031}