001/*
002 * Forge Mod Loader
003 * Copyright (c) 2012-2013 cpw.
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser Public License v2.1
006 * which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
008 * 
009 * Contributors:
010 *     cpw - implementation
011 */
012
013package cpw.mods.fml.common.modloader;
014
015import net.minecraft.network.NetServerHandler;
016import net.minecraft.network.packet.*;
017import cpw.mods.fml.common.network.IChatListener;
018
019public class ModLoaderChatListener implements IChatListener
020{
021
022    private BaseModProxy mod;
023
024    public ModLoaderChatListener(BaseModProxy mod)
025    {
026        this.mod = mod;
027    }
028
029    @Override
030    public Packet3Chat serverChat(NetHandler handler, Packet3Chat message)
031    {
032        mod.serverChat((NetServerHandler)handler, message.message);
033        return message;
034    }
035
036    @Override
037    public Packet3Chat clientChat(NetHandler handler, Packet3Chat message)
038    {
039        mod.clientChat(message.message);
040        return message;
041    }
042
043}